Closed almosnow closed 6 years ago
Yep. The PDF Viewer in Chrome is itself a Chrome Extension I believe.
Check this out: https://github.com/mozilla/pdf.js/
The PDFium is a plugin for Chromium to open PDFs, and Electron does support it as well. You can enable it on Electron by giving plugins
attribute to <webview>
tag.
Ref: https://github.com/electron/electron/blob/master/docs/api/webview-tag.md#plugins
Or, as @LucaT1 pointed, mozilla/pdf.js is also a good PDF viewer too.
Do you really need a minimalist browser to display PDFs for you though? @almosnow.
Yes.
Minimal != lacking in features.
Also, I think PDFs are pretty much a de facto web standard by now. Think of it, it only displays documents, they always render the same, they look good and most of the time they come in a lightweight archive. They're compatible with the minimal mindset, unlike alternatives like word...
On Thursday, September 21, 2017, Simon Solnes notifications@github.com wrote:
Do you really need a minimalist browser to display PDFs for you though? @almosnow https://github.com/almosnow.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thmsbfft/oryoki/issues/36#issuecomment-331147609, or mute the thread https://github.com/notifications/unsubscribe-auth/AEslffWmZDoiKDnS_VLu32Oo_UluuBkUks5sklyFgaJpZM4PSMJs .
I completely agree with @almosnow especially given that it wouldn't add any size or load time supporting this feature since it's already built-in Electron.
And still, PDF today is such a basic and essential task that it's not acceptable for a browser in 2017 to miss such a feature, given that it's essential on offices where a lightweight browser would also help on a generally low-powered computer.
Good suggestions. Wasn't aware that that was a built-in feature in Electron. Tested in ed29e25, will be in the next release along with some bug fixing - prolly this weekend.
Thanks everybody! Closing now.
since it's already built-in Electron
Oh ... no 😭
I was working on a PR that implemented a viewer using pdf.js. Felt pretty proud about it.
But anyway, that's actually good news. Definitely waiting for the next release now.
Props! 🎉
Ow—
Looking into pdf.js, seems like functions are pretty similar to that of PDFium. Given the implementation was 2 lines, seems like a better option for now. The one thing would be to reskin the interface of PDFium, but I don't know how that's done yet.
Well just let me know if you need it (even if it is 4 years from now).
Whenever I want to view an online PDF, oryoki forces me to download it.
Is this because chrome's (or other browser's) PDF Viewer comes in as a separate component?