Live data from Hacker News

Firefox introduces PDF viewer

blog.mozilla.org

101–110 of 200 posts

Re: Firefox introduces PDF viewer

#101
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…

Uhm... on my machine, the firefox version actually loads this just as quickly and with notably smoother scrolling? I guess it's the other way around on your machine. It doesn't allow form filling though.

Honestly I couldn't care either way. Even the acrobat plugin seems to be much better behaved these days, so...

Re: Firefox introduces PDF viewer

#102
post #27
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…

Your comment would've been so much better without its last paragraph.

It's lovely how one comment like that also manages to turn the whole thread into a them vs. us flamewar :-(

Re: Firefox introduces PDF viewer

#103
post #34
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…

Mac users would say it was Safari. :)

Or OmniWeb before that. PDF in the browser? Congrats, you're only twelve years behind.

Re: Firefox introduces PDF viewer

#104
Before this patch, this is usually how I would open PDFs in Firefox:

"Okay, so I clicked on the link. Wait - where's the Download box? No, wait -- I told Firefox to download this MIME type automatically, right? Okay, but where is Evince? I thought it would load after I downloaded it. Okay, let me cd to Downloads, it's probably there. Okay, now I have to open Evince -- no, wait, I can just open Thunar to open it because the .pdf MIME is associated with Evince. Okay, so now I have to launch Thunar... Okay, now where is my Downloads folder again?"

Granted, it would be easier if I weren't such a blockhead, but it's still a royal pain in the ass.

Re: Firefox introduces PDF viewer

#105
post #67
post #58

Earlier quoted context omitted.

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…

This is a good point, but a separate issue (and kudos to PDF.js if accessibility was a purposeful design point of their implementation, not just a happy coincidence... they could certainly have chosen other avenues, such as generating a WebGL scene that would be opaque to screen readers). And Chrome's viewer should indeed be accessible, I'll raise this question internally.

For that to have been a happy coincidence is basically impossible with PDF. You're told a run of positioned glyphs to render, but then you have to figure out what text those really represent by looking at the font tables (even the simplest documents tend to contain ligatures)...and that's before you assemble the runs into sentences, paragraphs, columns etc, generally without help from the PDF, although it can optionally contain this info. The first version of PDF.js rendered positioned images of text runs, text extraction came later and was definitely deliberate.

(I was paying attention, as I wrote some of the code to do multicolumn text selection in poppler)

Re: Firefox introduces PDF viewer

#106
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.

Given how well PDF.js runs using Mozilla's JS engine, I have to wonder how well it would perform with V8.

Re: Firefox introduces PDF viewer

#107

If you want to try PDF.js from your current browser, here's a demo: http://mozilla.github.com/pdf.js/web/viewer.html I wonder what's keeping this so ugly in Chrome. Also, does anyone know if printing is intended to work? It doesn't appear to have the pagination right, again at least on Chrome.

Looks much better than I imagined. Also painfully slow.

Re: Firefox introduces PDF viewer

#108
Dumb question: What's to stop Chrome from eventually adopting PDF.js?

Personally, I see that as the future. Its open source, its "good enough", and Google doesn't have to license the pdf viewer anymore.

Also it's a big coup against Adobe, when everyone with firefox and chrome can pretty much uninstall your Adobe Reader software. I haven't even mentioned shrinking the market on 3rd party PDF viewers.

Re: Firefox introduces PDF viewer

#109
post #76
post #35

Earlier quoted context omitted.

To be sure, Safari is invoking a system level PDF reader to handle inline PDFs. That's what gets you that silky performance and nice rendering. When you pop the PDF out, it then gets passed to the full Preview.app.

>> To be sure, Safari is invoking a system level PDF reader to handle inline PDFs. That's what gets you that silky performance and nice rendering. Which, IMO, is the way it should be, and not just for PDFs. I'm impressed by the fact that Mozilla implemented a capable PDF reader in JavaScript, but I won't be using it. Firefox and Chrome are both trying too hard to duplicate everything my OS already provides: their own…

That only works if you don't care about fragmenting what features you support on multiple OSes, and trust those codes to do the right thing in all of your use cases for it.

For some of the browsers it's clearly better for them to bundle the kitchen sink, since at least it's their kitchen sink and guarantees the kitchen sink will always be there.

Post reply on HN