Live data from Hacker News

Firefox introduces PDF viewer

blog.mozilla.org

51–60 of 200 posts

Re: Firefox introduces PDF viewer

#51

Earlier quoted context omitted.

That's interesting, because PDFs are an inherently un-streamable format. It requires seeking within the file to work (hence why command line PDF tools can't take STDIN for the PDF file - or they fake it by copying to a temp file first). I wonder how google got around that problem.

You could try to progressively render the file, pausing when a required forward reference isn't within the data you have downloaded so far.

That seems to be what they do, in my experience.

Re: Firefox introduces PDF viewer

#53

Earlier quoted context omitted.

That's interesting, because PDFs are an inherently un-streamable format. It requires seeking within the file to work (hence why command line PDF tools can't take STDIN for the PDF file - or they fake it by copying to a temp file first). I wonder how google got around that problem.

You could try to progressively render the file, pausing when a required forward reference isn't within the data you have downloaded so far.

[deleted]

Re: Firefox introduces PDF viewer

#54
post #6

Love it, but unlike Chrome's embedded PDF reader, it can't "stream" PDFs (a dealbreaker for people viewing media-heavy PDFs on slower connections)

That's interesting, because PDFs are an inherently un-streamable format. It requires seeking within the file to work (hence why command line PDF tools can't take STDIN for the PDF file - or they fake it by copying to a temp file first). I wonder how google got around that problem.

Actually, PDF files can be optimized for streaming: http://acroeng.adobe.com/wp/?page_id=27

It's covered in Annex F of the PDF spec: https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/pdf...

Re: Firefox introduces PDF viewer

#55
post #31
post #9

It's worth pointing out this is done in pure Javascript , and works by compiling PDF functions to equivalent Javascript functions which are then visible to Firefox's JIT. Despite being only around a year old, it still manages to render the majority of PDFs thrown at it (it's been my primary paper reader for the past 6 months or so). As for missing features like some complex gradients, I can't say I've missed them, ex…

I thought one of the safety features of some pdf readers was the ability to disable javascript. How does that work here if this is entirely implemented in javascript? Disregard if I'm not understanding this correctly.

I believe the security feature is the ability to disable Javascript code that is included within the pdf file. A pdf reader implemented in Javascript is perfectly capable of doing that.

Re: Firefox introduces PDF viewer

#56
post #45
post #9

It's worth pointing out this is done in pure Javascript , and works by compiling PDF functions to equivalent Javascript functions which are then visible to Firefox's JIT. Despite being only around a year old, it still manages to render the majority of PDFs thrown at it (it's been my primary paper reader for the past 6 months or so). As for missing features like some complex gradients, I can't say I've missed them, ex…

> While Mozilla are pumping out stellar designs like this, Google are pushing crap like Native Client and their proprietary, binary-only Foxit Reader solution instead, complete with the hundreds of thousands of LOC of insecure C this entails. Rock on, Mozilla! Why are you dumping on Google? Their browser has been able to handle PDFs for years (including forms!).

Chrome's PDF plugin is closed source, and written in C. It is very useful, but not free as in FOSS.

Re: Firefox introduces PDF viewer

#57
just tried it on a large PDF. Chrome takes about 1 second to load while FF takes 10, and the visual result in FF is nearly unreadable (while in Chrome it looks just like it does in Acrobat). i'd love to have nice open-source native PDF support, but this surely doesn't cut it for release.

Re: Firefox introduces PDF viewer

#58
post #13
post #9

It's worth pointing out this is done in pure Javascript , and works by compiling PDF functions to equivalent Javascript functions which are then visible to Firefox's JIT. Despite being only around a year old, it still manages to render the majority of PDFs thrown at it (it's been my primary paper reader for the past 6 months or so). As for missing features like some complex gradients, I can't say I've missed them, ex…

Please take your time machine and go release PDF.js in early 2010. With good performance on the hardware and Javascript VMs of early 2010. Then I'll grant you the criticism of Chrome's PDF viewer. Otherwise, trolling... fact is, Chrome is the browser that liberated the world from Acrobat Reader. PDF.js is awesome and it may be the way to go, but as of today Chrome's viewer is still much better -- please try http://ww…

Since I'm blind Firefox wins every time over Google Chrome. I tried out the link you had in your comment and I can at least read some of the text in Firefox with my screen reading software. I assume this is because Firefox turns it into some form of HTML that is then accessible through the normal function of assistive technology. Google Chrome uses some kind of plugin that doesn’t provide any accessibility support so I get a blank page without any text. Even if the performance isn’t as good I’d much rather deal with things that are rendered to HTML and JavaScript.

Re: Firefox introduces PDF viewer

#59
post #22
post #13

Earlier quoted context omitted.

Please take your time machine and go release PDF.js in early 2010. With good performance on the hardware and Javascript VMs of early 2010. Then I'll grant you the criticism of Chrome's PDF viewer. Otherwise, trolling... fact is, Chrome is the browser that liberated the world from Acrobat Reader. PDF.js is awesome and it may be the way to go, but as of today Chrome's viewer is still much better -- please try http://ww…

From what I can gather Chrome's PDF viewer pretty much is Acrobat Reader. (It's also not available to users of the open-source version Chromium - in fact, as far as I can tell there's no decent way to read PDFs in Chromium at all.)

The pdf.js repository contains a Chrome/Chromium plugin, which works for me. YMMV.

Re: Firefox introduces PDF viewer

#60
post #45

Earlier quoted context omitted.

> While Mozilla are pumping out stellar designs like this, Google are pushing crap like Native Client and their proprietary, binary-only Foxit Reader solution instead, complete with the hundreds of thousands of LOC of insecure C this entails. Rock on, Mozilla! Why are you dumping on Google? Their browser has been able to handle PDFs for years (including forms!).

Chrome's PDF plugin is closed source, and written in C. It is very useful, but not free as in FOSS.

And... ?
Post reply on HN