Comments (17)
@kamranahmedse Should this be implemented by using a JS library to display the PDF ?
Various Electron implementations here : https://electronjs.org/apps
Let me know what we should use, as I would like to work on this.
Update : Apparently electron can use Chrome's default pdf viewer https://stackoverflow.com/questions/45874719/opening-pdf-files-in-electron
from pennywise.
Yeah I would say use the default chromium one
from pennywise.
Tried using file input via <input type="file">
but as it returns fakepath, it can't be used
Update : Passing path of pdf as URL just causes it to download. Similar result by calling mainWindow.loadURL
on the pdf. Might have to use plugin.
Update 2 : IT FLOATS ! Could get PDF support via plugin and command line. Now to somehow get location of file and pass it as event to electron.
See the last 2 commits in my repo to see how I did it : https://github.com/akash-joshi/pennywise
from pennywise.
Things which need to be improved : Check for extension; this is useful when media support is added
from pennywise.
The reason you get fake path is because JavaScript can't get access to filepaths you need to do new fileReader
from pennywise.
@The-Code-Monkey It's working now. Check out my fork
from pennywise.
Ok will do.
from pennywise.
@The-Code-Monkey Now in #47
from pennywise.
Im not sure how it works ive selected a file and its not clear what im supposed to do next?
from pennywise.
Ive added some styles i will make a pr to your fork ive not modified any of the files except from adding some styles to make it not the default button.
from pennywise.
Wait
from pennywise.
I've removed that, check #47 . Are you on twitter, Tele or somewhere ? For faster communication
from pennywise.
I'm on twitter @exoticcollector
from pennywise.
Ive got the loaded file console logging the base 64 for the file it just need to now be displayed onto the page but im unsure of how you have set the rest of it up.
from pennywise.
I have pushed to my local master branch if you want to take a look at what i have done i cant do much more today
from pennywise.
From #47, you just have to go under file -> open, or press cmd or ctrl + O and select the pdf you want to open.
from pennywise.
Ah ok
from pennywise.
Related Issues (20)
- Feature Request: Transparent pages
- feature: support for media keys
- Update README for installation command HOT 1
- Enable JavaScript
- Pennywise 0.8.0 infected with Malware-Gen [Trj] according to AVAST Antivirus HOT 1
- How to build pennywise???
- Pennywise and screen sharing in Zoom not working together
- *Feature Request* reduce size of navigation bar or hide navigation bar on window inactivity.
- *feature request* Hope this app could open and read files HOT 1
- Update install instructions HOT 1
- way to minimize top bar HOT 1
- Bug: server on port 6280 doesn't launch passed links HOT 1
- Malware NukeSped in pennywise--0.8.0.dmg HOT 1
- [Feature Request] Option to reload webpages automatically
- Pennywise malware detected. HOT 3
- Frameless Window Issue
- moonlock & plex
- a combination of the scary clown and the malware association is making me too wary to install this! HOT 1
- Add a key combo to make it appear and disappear
- Browser does not work properly when a protection software is running in the background
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pennywise.