
A standards-based PDF viewer created using Electron and Pdf.js - burtonator
https://github.com/praharshjain/Electron-PDF-Viewer/
======
eberkund
On Windows I like Sumatra ([https://www.sumatrapdfreader.org/free-pdf-
reader.html](https://www.sumatrapdfreader.org/free-pdf-reader.html)), it's
only a few MBs and opens blazing fast and I have never had a problem reading
any PDFs with it. There's also some nifty things you can do with its CLI.

~~~
fithisux
SumatraPDF and muPDF for really big pdfs. When on the mood, I use my trusty
GSView.

------
nsuser3
I really dont understand why I should open a new browser instance (Electron)
to view one pdf when I could just open it in my browser..

~~~
rrosen326
This particular solution may not be solving the problem I need, but I'd love
to see a really good version of PDF.js running in electron for existing
electron apps.

Use case: You're building an electron app. It needs to view pdfs. Right now,
you need to implement pdf.js yourself. It's non trivial. And the more full-
featured you want it, the harder it is.

And that's only half the issue. What if you want a cross-platform way to
create a thumbnail of a pdf? Ugg, don't let me get started on ghostscript...

~~~
mschuster91
> What if you want a cross-platform way to create a thumbnail of a pdf? Ugg,
> don't let me get started on ghostscript...

Embed statically linked versions of imagick in your program or download them
upon first load/setup.

~~~
chatmasta
Someone who knows how to do that probably isn’t programming in electron.

------
jwilk
What do you mean by "standards-based"?

~~~
jlarocco
I'm not sure what the authors mean, but although PDF was created by Adobe
there is an ISO standardized version of it now.

[https://en.wikipedia.org/wiki/PDF/A](https://en.wikipedia.org/wiki/PDF/A)

~~~
jwilk
PDF proper is an ISO standard, too:

[https://en.wikipedia.org/wiki/History_of_the_Portable_Docume...](https://en.wikipedia.org/wiki/History_of_the_Portable_Document_Format_\(PDF\)#ISO_Standardization)

------
tptacek
People seem skeptical of this because of Electron fatigue, but keep in mind
that if your browser's built-in PDF rendering is native code, there's
potentially a security win to replacing that attack surface with Pdf.js.
Already, we go to some trouble to train people to open attachments on Google
Drive's web viewers rather than by double-clicking on them.

~~~
koolba
Doesn't Firefox itself use pdf.js for PDF rendering?

The FAQ says it's been baked into Firefox since v19:
[https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-
Ques...](https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions)

~~~
tptacek
Yes, Pdf.js is a Mozilla project, right?

------
tathougies
We have truly come full circle

~~~
hedora
It’s too bad electron won’t run in display postscript environments.

------
rffn
And this does display PDFs with embedded HTML pages? Could these embedded web
pages contain pdf.js again to show an embedded PDF?

~~~
nasredin
You've just inceptioned yourself to OUT OF MEMORY crash!

------
butz
Or you could just open PDF with your browser.

------
jlarocco
Every one of the browser and/or Javascript based PDF viewers I've used has
been a terrible experience, and this one doesn't seem to be any different.

If I download a PDF it's because I want to open it in my regular PDF viewer
(mupdf) and not in a crappy browser based one.

------
teaspoons
What I want from a PDF viewer is dark mode (white on black). I know on MacOS
you can do invert colours, but that inverts the images too. Also I want to be
able to view portrait PDFs in landscape mode with the text in 2 columns.

~~~
tincholio
Zathura supports this (and is otherwise awesome, too)

------
SigmundA
Did Pdf.js ever get their SVG backend working? Without that printing was
basically broken since it just printed out each page as a bitmap from canvas
at like 96 dpi which ended up being low res / fuzzy on paper.

------
Rjevski
A PDF viewer that eats up half my RAM. Just what I needed.

------
znedw
zathura is nice on *nix, has support for multiple pdf rendering engines (muPDF
and poppler).

------
burtonator
I think this project deserves a lot more attention.

There aren't decent PDF tools for Linux and this is also based on web
standards which is awesome.

The combination of older/robust technology like PDF but with modern web
standards is really compelling.

~~~
krastanov
In my experience Evince (the PDF reader in Gnome) works much better than
PDF.js (and is faster, has smaller footprint, supports more advanced PDF
feature, etc).

~~~
fithisux
I totally agree.

