Live data from Hacker News

PDF Viewing

github.com

41–50 of 63 posts

Re: PDF Viewing

#43
post #25

I'm not sure whether this is due more to the efforts of the PDF.js team or the Spidermonkey team, but I'm very pleased at the progress the project has made over the past year. Upon reading this story I happened to realize that I've had a 57-page PDF open in a separate tab for several days now on this five-year-old netbook with no performance or memory problems whatsoever (something that couldn't be said a year ago).…

Woo!

Re: PDF Viewing

#44

Unfortunately, I can't get a single paper to load on https://github.com/papers-we-love/papers-we-love , at least on my laptop. I guess PDF.js is limited to smaller PDF files or it just requires more GBs of RAM to support all file sizes.

https://github.com/papers-we-love/papers-we-love/blob/master... loaded fine here. My computer is almost 10 years old.

Re: PDF Viewing

#45

Any sane reason to store PDF files into git repositories? Why would you version binary files; version LaTeX, or whatever's generating your PDFs.

Design comps/wireframes are frequently shared as pdfs. Designers do not like storing their source files in git.

Re: PDF Viewing

#46

I don't understand it... what's the benefit of this as opposed to just embedding an iframe? And whats the role of pdf.js here? They seem to just show images of the pages - non interactive and non-selectable. When you are using pdf.js, you can actually get a nice embedded viewer exactly like firefox has (and similar to chrome). And the embedded pdf.js viewer would also be more secure than the iframe, if that's your co…

Perhaps PDF.js is being used on the backend to render the images of each page.

If was so, Poppler or MuPDF were better solutions for better rendering engine and much better performances.

But Github uses client side the PDF.js, that draw the content of parsed PDF file in a canvas.

Re: PDF Viewing

#47

Congrats to the PDF.js team for the adoption. I'm curious as to how the pdf2htmlEX project [0] compares to PDF.js. Instead of client-side conversion this is a server-side one-time conversion from PDF to HTML5. [0] https://github.com/coolwanglu/pdf2htmlEX

I tried in past and I can tell you that pdf2htmlEX don't have acurate rendering, even if is based on Poppler, because generates HTML code at absolute position that looks different in every browser and have problems with index of layers.

Re: PDF Viewing

#48

is there a way to render pdf into html that can be viewed in a browser?

pdf.js. It's the same thing github is using (as stated on the article), and it's also what firefox uses to render PDFs (yes, firefox renders PDFs with html+js).

Doesn't Chrome also use html+js to render PDFs? (but something different from pdf.js)

Re: PDF Viewing

#49

I don't understand it... what's the benefit of this as opposed to just embedding an iframe? And whats the role of pdf.js here? They seem to just show images of the pages - non interactive and non-selectable. When you are using pdf.js, you can actually get a nice embedded viewer exactly like firefox has (and similar to chrome). And the embedded pdf.js viewer would also be more secure than the iframe, if that's your co…

No its actually pdf.js rendered on a canvas [0]. But the text is non-selectable it seems?

[0] see https://github.com/papers-we-love/papers-we-love/blob/master...

Re: PDF Viewing

#50

Earlier quoted context omitted.

pdf.js. It's the same thing github is using (as stated on the article), and it's also what firefox uses to render PDFs (yes, firefox renders PDFs with html+js).

Doesn't Chrome also use html+js to render PDFs? (but something different from pdf.js)

Chrome uses a pdf plugin embedded in Chrome.
Post reply on HN