News for hackers. Stuff that matters.
Re:Firefox introduces PDF viewer by hosay123 on Wednesday February 20, 2013 @12:52PM (#5251952)
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, except on occasion when dealing with shiny PR materials. Earlier versions occasionally emitted blank pages, but these could always be skipped thanks to a side effect of the PDF format.

PDF.js has an amazing future for such a young project, and it is the foremost demonstration of exactly how complex programming tasks can be expressed using native web technologies. Turns out 35kLOC of Javascript almost completely subsumes the functionality of a behemoth native application (Adobe Reader) that on some machines would require half a minute just to 'boot'.

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!

Re:Firefox introduces PDF viewer by opinali on Wednesday February 20, 2013 @01:05PM (#5252058)
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://www.irs.gov/pub/irs-pdf/fw4.pdf in both browsers and tell me which one is sluggish and renders so-so, and which renders/scrolls instantly and perfectly and also allows you to actually fill the form.
Re:Firefox introduces PDF viewer by jareds on Wednesday February 20, 2013 @02:20PM (#5252596)
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 by opinali on Wednesday February 20, 2013 @02:39PM (#5252740)
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.
Re:Firefox introduces PDF viewer by bazzargh on Wednesday February 20, 2013 @03:58PM (#5253309)
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 by Watabou on Wednesday February 20, 2013 @01:20PM (#5252175)
On the mac, Firefox Nightly loads the PDF in a second while Google Chrome Dev loads in about three seconds. I can enter text in the pdf in Chrome while Firefox gives an annoying little "The pdf might not be rendered perfectly" error bar at the top.

Let's try Safari: Loads in under a second maybe even faster, super quick scrolling, ability to enter text and the option to download the pdf on the bottom. This is the way browsers should handle pdf. We are just not there yet. I don't want to use Safari though. Firefox is the browser for me.

I almost always download the pdf anyways and view it through Preview.app, especially if I want to actually input text in the pdf. I love Preview. It's like the best PDF reader out there. Preview is what liberated me from Acrobat. Well, switching to the Mac did that for me, really.

Re:Firefox introduces PDF viewer by RandallBrown on Wednesday February 20, 2013 @02:43PM (#5252776)
PDF performance is great on the Mac because Apple's 2d drawing system is actually based on the PDF spec. You can even "print" to a pdf from just about any Mac application that supports printing.

http://en.wikipedia.org/wiki/Quartz_2D

Re:Firefox introduces PDF viewer by esbwhat on Wednesday February 20, 2013 @02:52PM (#5252836)
just a note, but you can do that in linux and afaik windows as well
Re:Firefox introduces PDF viewer by iso-8859-1 on Wednesday February 20, 2013 @06:25PM (#5254094)
on Windows, you can print to XPS out of the box, but not PDF.
Re:Firefox introduces PDF viewer by jpxxx on Wednesday February 20, 2013 @01:50PM (#5252407)
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.

Re:Firefox introduces PDF viewer by w0utert on Wednesday February 20, 2013 @02:52PM (#5252835)
>> 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 video codecs, audio codecs, image codecs, the Flash plugin (Chrome), now a PDF viewer, and so on. I'd rather just have my browser render HTML/CSS, run JavaScript, and that's about it. It doesn't have to implement anything else itself, all modern OS's should have everything required to display all the embedded content.

Re:Firefox introduces PDF viewer by rictic on Wednesday February 20, 2013 @06:02PM (#5253983)
The main problem I see with that is security. PDF is a huge attack surface, reducing that to the already existing and well tested javascript surface is a huge win. Ideally (in my mind) every browser will come to use Mozilla's pdf implementation.
Re:Firefox introduces PDF viewer by jfb on Wednesday February 20, 2013 @06:38PM (#5254176)
Ideally, I would trust my OS vendor and be safe using their superior PDF renderer. I think my ideal world is likelier to come to pass than yours, sad to say.
Re:Firefox introduces PDF viewer by rys on Wednesday February 20, 2013 @04:34PM (#5253517)
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.

Re:Firefox introduces PDF viewer by ___1___ on Wednesday February 20, 2013 @01:44PM (#5252351)
I don't have firefox and a pdf view won't change that. Your description of Safari matches that of Chromium on Arch Linux.
Re:Firefox introduces PDF viewer by omaranto on Wednesday February 20, 2013 @02:27PM (#5252644)
I don't think that's right: I use Chromium on Arch Linux and it does not seem to have a PDF viewer. It always offers to download PDFs and open them with a separate program, often warning me first that PDFs from unknown sources can be dangerous.
Re:Firefox introduces PDF viewer by Watabou on Wednesday February 20, 2013 @01:46PM (#5252378)
Does Chromium have a built in PDF reader? I thought google adds that in for Chrome along with Flash?
Re:Firefox introduces PDF viewer by natex on Wednesday February 20, 2013 @02:34PM (#5252701)
It is not included, but can be installed. (libpdf)

https://wiki.archlinux.org/index.php/Chromium#Open_PDF_files...

Re:Firefox introduces PDF viewer by Terretta on Wednesday February 20, 2013 @02:54PM (#5252847)
> Please take your time machine and go [to] early 2010... Chrome's PDF viewer... fact is, Chrome is the browser that liberated the world from Acrobat Reader.

Fact check:

August 31, 2006: "Current versions of Safari are able to access PDF documents in a number of different ways. It can display the documents inline (in the Web browser window) without the use of a plug-in, it can use the Adobe Preview plug-in to display documents inline with added controls, or it can pass PDF viewing duties off to another application like Adobe Reader or Apple's own Preview.app."

http://reviews.cnet.com/8301-13727_7-10327228-263.html

"Google Chrome ... was released as a beta version for Microsoft Windows on September 2, 2008, and as a stable public release on December 11, 2008."

http://en.wikipedia.org/wiki/Google_Chrome

Re:Firefox introduces PDF viewer by jf22 on Wednesday February 20, 2013 @03:01PM (#5252909)
Safari, outside of mobile, just isn't used like Chrome is.

Chrome liberated us from Adobe Reader because its what we actually use.

Re:Firefox introduces PDF viewer by meaty on Wednesday February 20, 2013 @02:30PM (#5252677)
Bollocks. Chrome's PDF implementation absolutely sucks. I have numerous PDF documents which it can't handle at all. I've just opened them in Firefox 19 and they are absolutely spot on.

I'm uninstalling Acrobat reader for a week to see how it goes now. Chrome never gave me that.

Re:Firefox introduces PDF viewer by iso-8859-1 on Wednesday February 20, 2013 @06:27PM (#5254101)
Can you link them please? We already have links to PDF's rendering better in Chrome. I'd like to see where pdf.js does a better job.
Re:Firefox introduces PDF viewer by meaty on Thursday February 21, 2013 @03:01AM (#5256119)
Unfortunately not as they contain sensitive information (financial contracts).
Re:Firefox introduces PDF viewer by Ygg2 on Wednesday February 20, 2013 @01:13PM (#5252119)
They both display about the same (nothing a casual glance could reveal). Firefox took ~ 1 second, while Chrome was slightly faster <1 second. It's hard to count. But it's about the same give or take a few hundred miliseconds.

My setup is FF 19.0 and Chrome 24 on Win7 with 8Gb Ram and 3.1GHz processor.

Re:Firefox introduces PDF viewer by fafner on Wednesday February 20, 2013 @05:54PM (#5253948)
Chrome's PDF viewer lacks the basic features one expects from a PDF viewer. It doesn't make sense to abandon the concept of pages or not support ToC. Those things are essential in PDFs. pdf.js handles all of those things. And there were browsers being able to display PDF before Chrome. KDE's Konqueror could simply load KPDF and Safari had Preview.app embedded.

I wish Google would abandon their viewer (which is closed source btw) and rather start using and contributing to pdf.js.

Re:Firefox introduces PDF viewer by Scriptor on Wednesday February 20, 2013 @01:17PM (#5252149)
On average, I might need to fill out a PDF once or twice a year. Otherwise rendering for either one is perfectly fine for me.
Re:Firefox introduces PDF viewer by opinali on Wednesday February 20, 2013 @02:36PM (#5252718)
This was just a random example. I'm sure if you take a statistically-significant variety of PDFs and benchmark rendering quality, speed and features in all PDF viewers out there, PDF.js won't be any closer to the top; Chrome's viewer will certainly not be the very best but not one of the worst either.
Re:Firefox introduces PDF viewer by chc on Wednesday February 20, 2013 @01:22PM (#5252198)
Was early 2011 that different a place? Anecdotally, I've run PDF.js on a PowerPC desktop from 2005 with a late 2011 version of Firefox, and it was a bit pokier than I'd like, but it was usable for me.

(BTW: Apologies, it looks like I somehow fat-fingered a downvote on your post. Unfortunately there's no way to undo that on Hacker News. No slight intended.)

Re:Firefox introduces PDF viewer by makomk on Wednesday February 20, 2013 @01:20PM (#5252177)
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.)
Re:Firefox introduces PDF viewer by snotrockets on Wednesday February 20, 2013 @02:23PM (#5252613)
The pdf.js repository contains a Chrome/Chromium plugin, which works for me. YMMV.
Re:Firefox introduces PDF viewer by omaranto on Wednesday February 20, 2013 @03:07PM (#5252948)
The PDF viewer in Chrome is available to Chromium users (just copying the libpdf.so or libpdf.DLL file into the appropriate directory works); it's just not open source.
Re:Firefox introduces PDF viewer by chc on Wednesday February 20, 2013 @03:12PM (#5252985)
I think for most people, when they say "available," they mean "without copyright infringement."
Re:Firefox introduces PDF viewer by keeperofdakeys on Wednesday February 20, 2013 @07:42PM (#5254537)
As long as you don't distribute chromium with this file, then it will be fine. (You do it yourself).
Re:Firefox introduces PDF viewer by omaranto on Friday February 22, 2013 @08:23AM (#5264093)
I'm not sure what the rules are: Google gives me permission to install Chrome, and then, presumably I have permission to delete everything but the PDF viewer plugin, right? Maybe the Chrome EULA disallows this, but, to be honest, I didn't read it.
Re:Firefox introduces PDF viewer by makomk on Thursday February 21, 2013 @07:11AM (#5256942)
Ahhh. I couldn't find any information on how to do this the last time I looked.
Re:Firefox introduces PDF viewer by comex on Wednesday February 20, 2013 @03:24PM (#5253084)
It's FoxIt, not Acrobat.
Re:Firefox introduces PDF viewer by comex on Wednesday February 20, 2013 @01:47PM (#5252384)
Mac users would say it was Safari. :)
Re:Firefox introduces PDF viewer by wmf on Wednesday February 20, 2013 @03:48PM (#5253234)
Or OmniWeb before that. PDF in the browser? Congrats, you're only twelve years behind.
Re:Firefox introduces PDF viewer by emn13 on Wednesday February 20, 2013 @03:41PM (#5253196)
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 by blinkingled on Wednesday February 20, 2013 @01:52PM (#5252416)
>Chrome's viewer is still much better

On Linux - both FF19 and Chrome Stable are very close. FF rendering is a bit jerkier than Chrome but not by much.

Re:Firefox introduces PDF viewer by anatoly on Wednesday February 20, 2013 @01:33PM (#5252274)
Your comment would've been so much better without its last paragraph.
Re:Firefox introduces PDF viewer by emn13 on Wednesday February 20, 2013 @03:42PM (#5253202)
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 by anoncow on Wednesday February 20, 2013 @11:12PM (#5255315)
I don't understand the open source hate. Whether the code is open source or not makes a lot of difference. Not hating on google, but mozilla has this one right.
Re:Firefox introduces PDF viewer by jonknee on Wednesday February 20, 2013 @02:06PM (#5252496)
> 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!).

Re:Firefox introduces PDF viewer by snotrockets on Wednesday February 20, 2013 @02:18PM (#5252575)
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 by jonknee on Wednesday February 20, 2013 @03:25PM (#5253093)
That has nothing to do with anything. If you're just having a dick measuring contest, Google has contributed a ton to the open source community. Google also provides nearly 100% of funding for Mozilla.
Re:Firefox introduces PDF viewer by kzrdude on Wednesday February 20, 2013 @04:55PM (#5253631)
Open source is not about smelly dicks, it's about transparency, reusability, philsophy, politics. It's a lot of things (and they matter, because right now, society and technology are changing fast).
Re:Firefox introduces PDF viewer by simonster on Wednesday February 20, 2013 @08:12PM (#5254680)
For the average end user, it may not particularly matter that Mozilla's PDF implementation is open source and Google's isn't. However, for people like me who want to implement PDF-related functionality in their web/desktop application, it matters a great deal.
Re:Firefox introduces PDF viewer by recoiledsnake on Wednesday February 20, 2013 @05:23PM (#5253784)
I am not against your main point but I am sure that Microsoft will provide at least 110% of funding if Google pulled their "funding".
Re:Firefox introduces PDF viewer by natrius on Wednesday February 20, 2013 @05:47PM (#5253920)
If Microsoft were willing to provide pay as much or more, why aren't they doing it already to make Bing the default search engine?
Re:Firefox introduces PDF viewer by bad_user on Thursday February 21, 2013 @12:58AM (#5255725)
If you're in the US, you may not notice it, but Bing is plain awful for international users. Google has spent a considerable amount of resources improving their engine to serve results based on your location and Google's Search Engine is clearly the best by a long shot. This is also why I'm not using DuckDuckGo.
Re:Firefox introduces PDF viewer by elviseno on Thursday February 21, 2013 @06:47AM (#5256847)
Agreed. If Bing could match google's accuracy in scholar paper/reference searching I'd not mind to use it.
Re:Firefox introduces PDF viewer by ams6110 on Thursday February 21, 2013 @09:48AM (#5257649)
Bing on the other hand is much better than Google if you are searching for technical info on Microsoft products.
Re:Firefox introduces PDF viewer by batiudrami on Wednesday February 20, 2013 @07:48PM (#5254572)
My guess would be that if the offer is similar, Mozilla would be inclined to stick with Google. I'm sure you know how irritating it is to realise you missed a checkbox and now your homepage and default search are set to Bing - it's probably a user experience Mozilla was happy to avoid.

Plus, there are probably some advantages to having Google 'on side'.

Re:Firefox introduces PDF viewer by eslaught on Thursday February 21, 2013 @02:57AM (#5256102)
This product already exists, in at least proof of concept form: http://www.firefoxwithbing.com/

I think this is sufficient to show that they're at least thinking about it.

Re:Firefox introduces PDF viewer by unbeli on Thursday February 21, 2013 @05:31AM (#5256647)
"Sorry, this download is not supported by your system." Meh.
Re:Firefox introduces PDF viewer by cooldeal on Wednesday February 20, 2013 @06:04PM (#5253987)
Perhaps they had made an offer. We never would know.

We don't even know the details of the Mozilla-Google deal. For all the openness that Google and Mozilla appear to proffer, the agreement between them is a secret.

Re:Firefox introduces PDF viewer by lkbm on Wednesday February 20, 2013 @07:54PM (#5254600)
Mozilla has been saying for years that they will use the best engine, and take that engine's money if it's available. If Bing were clearly better than Google, they'd switch and be taking Microsoft's money.
Re:Firefox introduces PDF viewer by jonknee on Wednesday February 20, 2013 @10:24PM (#5255171)
They have said that during the time they are being offered the most money by the best search engine. That's easy. But Google keeps paying more which means Mozilla is after the highest bidder.
Re:Firefox introduces PDF viewer by asadotzler on Wednesday February 20, 2013 @11:33PM (#5255393)
That is not how Mozilla's decision making works. There's considerably more to it than such simple economics.

As a non-profit, we are here to create a public good. It's actually goods, plural, and services too. Firefox and other Mozilla products and services exist to promote the Mozilla mission, not to enrich the Mozilla organization.

Yes. Sustainability is certainly a factor in some of our decision making. Mozilla would be foolish to ignore significant opportunities to increase its mission impact. But revenue for sustainability is not the sole or even the dominant factor in any major product decision at Mozilla.

Re:Firefox introduces PDF viewer by est on Wednesday February 20, 2013 @07:51PM (#5254587)
Chrome's built-in PDF plugin is actually from a Chinese company called Foxit.

http://googlesystem.blogspot.com/2010/08/google-chromes-pdf-...

Now start China bitching.

Re:Firefox introduces PDF viewer by damian2000 on Wednesday February 20, 2013 @10:59PM (#5255284)
I've been using Foxit reader for years without knowing that it was Chinese. Its a great product - fast as hell - beats the pants off Adobe.
Re:Firefox introduces PDF viewer by brass9 on Wednesday February 20, 2013 @11:14PM (#5255319)
I'd started using Foxit for the same reason. But the speed advantage is no longer an issue. Adobe had closed the gap and Acrobat reader now loads just as fast as Foxit. Besides, Acrobat's rendering is far superior to Foxit's (not to mention Foxit fails to load some PDF document or displays garbage)

Acrobat is the new Foxit nowadays!

Re:Firefox introduces PDF viewer by damian2000 on Thursday February 21, 2013 @12:22AM (#5255584)
My problem with Adobe is that whenever I install any of their products I get the feeling I've just made my system more vulnerable to malware and the like. They've got an atrocious record when it comes to security bugs.

E.g. look at the size of this page: https://www.adobe.com/support/security/

Re:Firefox introduces PDF viewer by ams6110 on Thursday February 21, 2013 @09:51AM (#5257668)
I've not found anything that is even close to on par with Acrobat for fill-in PDF forms either.... Other viewers can sort-of handle it, but the results don't look right most of the time.
Re:Firefox introduces PDF viewer by qu4z-2 on Thursday February 21, 2013 @09:30PM (#5262159)
I like MuPDF. It doesn't really have an "interface" though. Just page-up, page-down, and +/- to zoom. But if all you're doing is reading pdfs...
Re:Firefox introduces PDF viewer by efdee on Wednesday February 20, 2013 @02:25PM (#5252632)
And... ?
Re:Firefox introduces PDF viewer by jlongster on Wednesday February 20, 2013 @03:11PM (#5252980)
It's not just a matter of open/closed source. Bundling in yet another C binary is only going to widen the surface area for security vulnerabilities for millions of people, and there's really not a great reason to do so anymore. PDF.js proves that it's possible to write high-performance javascript to do this stuff, without introducing any security risks and it's completely cross-platform. Computers are only going to get faster, and js compilers are only going to get better too.
Re:Firefox introduces PDF viewer by jonknee on Wednesday February 20, 2013 @03:36PM (#5253160)
But Chrome's works better and has been around (and useful for millions) for years. Perhaps they'll move to a JS solution in the future, but if I had to choose between the two right now I'd take the faster more complete one.
Re:Firefox introduces PDF viewer by mehrzad on Wednesday February 20, 2013 @05:23PM (#5253789)
>But Chrome's works Citation needed, pdf.js has performed better for me personally than Chrome's viewer.
Re:Firefox introduces PDF viewer by abrowne on Wednesday February 20, 2013 @06:30PM (#5254118)
pdf.js supports PDF indexes (or whatever that's called), but AFAICT Chrome's doesn't.
Re:Firefox introduces PDF viewer by pifflesnort on Thursday February 21, 2013 @09:08AM (#5257430)
JS-everywhere ideologues are always trying to buy a hamburger today and pay for it tomorrow. Someday machines will be faster. Someday the implementation will on par with the alternatives.

How it works today is what matters to users. Tomorrow the native stack will just make use of more hardware features, it will still be faster, and we'll still be having the same conversation that we'be been having with JS ideologues for 10 years now. "Someday ..."

This is what the XML ideologues used to say too. The problem wasn't XML, it was the libraries, or the lack of dedicated XML processing hardware. Then someone realized that if you got rid of the core complexity -- XML -- you could stop layering on piles of additional complexity while trying to work around the root of the problem.

Someday...

Re:Firefox introduces PDF viewer by lclarkmichalek on Wednesday February 20, 2013 @02:40PM (#5252746)
Something being closed source matters to some people. You might not be one of them, but other people might have different perspectives that cause them to value an open source option above a closed source equivalent.
Re:Firefox introduces PDF viewer by siddhant on Wednesday February 20, 2013 @02:58PM (#5252878)
Yes but the masses don't care if it's open or closed source.
Re:Firefox introduces PDF viewer by LeonidasXIV on Wednesday February 20, 2013 @05:23PM (#5253785)
No, but we should. For the masses that don't.
Re:Firefox introduces PDF viewer by PavlovsCat on Thursday February 21, 2013 @03:10AM (#5256138)
That the masses don't care about open source is reason to work really hard to educate them; not reason to not care either.
Re:Firefox introduces PDF viewer by gcb0 on Wednesday February 20, 2013 @02:44PM (#5252782)
... from there comes most infections on windows PCs running chrome.
Re:Firefox introduces PDF viewer by heartbreak on Wednesday February 20, 2013 @03:22PM (#5253070)
Source?
Re:Firefox introduces PDF viewer by drzaiusapelord on Wednesday February 20, 2013 @10:54PM (#5255265)
This is ridiculous. The foxit plugin is fully sandboxed and I have not seen any exploits via any of the netsec lists I subscribe to.
Re:Firefox introduces PDF viewer by simonster on Wednesday February 20, 2013 @11:31PM (#5255382)
With a couple Google queries, you can find out that the Chrome PDF viewer has had multiple vulnerabilities that allow code to be executed in the sandboxed environment, and that there have also been Chrome vulnerabilities that allow sandboxed code to escape the sandbox.

Sandboxing is certainly a good thing, but it's not perfect. Sandboxed code still increases the attack surface. The rationale behind pdf.js is that, because it's almost entirely unprivileged JavaScript, it's unlikely that there's a way to exploit a browser in the presence of pdf.js that wouldn't work in the absence of pdf.js.

Re:Firefox introduces PDF viewer by pifflesnort on Thursday February 21, 2013 @09:11AM (#5257443)
The browsers themselves have also been subject to such vulnerabilities. I dare say the attack surface of a full browser implementation is much larger than just the sandboxing, and sandboxing ideally sits behind all I trusted operations in the browser, providing a single common last line of defense.
Re:Firefox introduces PDF viewer by benaiah on Wednesday February 20, 2013 @04:36PM (#5253529)
Actually, that would be Java.
Re:Firefox introduces PDF viewer by iso-8859-1 on Wednesday February 20, 2013 @06:21PM (#5254071)
Source? I don't believe this since so many levels of confirmation is required. I think the biggest source is the simple links to "KimKSexTape.jpg.exe".
Re:Firefox introduces PDF viewer by benaiah on Wednesday February 20, 2013 @07:51PM (#5254584)
Source: http://www.kaspersky.com/about/news/virus/2012/Oracle_Java_s... (Chrome uses its own PDF system, not Adobe Reader, so it's not even close to the threat level of Java).

Java has had multiple drive-by exploits discovered in just the past few months, which by definition don't require confirmation.

I was inaccurate, however. Java is almost certainly the cause of most exploits, but I daresay that user inexperience (to put it kindly) is probably the source of most infections. Touchè.

Re:Firefox introduces PDF viewer by fafner on Wednesday February 20, 2013 @05:49PM (#5253929)
The Chrome PDF Viewer is not really useful. There is no table of contents. You can't jump to specific pages. And so on. It is also closed source.

I wish Google would rather abandon their current viewer and start contributing/using pdf.js.

Re:Firefox introduces PDF viewer by jedbrown on Wednesday February 20, 2013 @09:22PM (#5254979)
Google's PDF viewer refuses to save PDFs opened via the websites of some scientific journals. I'm not willing to play the proxy game every time I want to read journal papers so I save them locally. I stopped using Google's PDF viewer because of this misfeature.
Re:Firefox introduces PDF viewer by drzaiusapelord on Wednesday February 20, 2013 @10:55PM (#5255270)
Can you provide a citation or an example link for me to test? My understanding is that Chrome has the foxit plugin in a fully sandboxed environment. The PDF format nor the foxit system has any kind of DRM and shouldn't support this behavior.
Re:Firefox introduces PDF viewer by jedbrown on Wednesday February 20, 2013 @11:39PM (#5255418)
There isn't any DRM, the plugin is just listening to a "suggestion" that it not let me save (no error, it just doesn't do anything when I click the save icon). Everything on ScienceDirect has this property. I just tested with this paper from my RSS feed (Chromium 24.0.1312.70).

http://www.sciencedirect.com/science/article/pii/S0045782513...

Re:Firefox introduces PDF viewer by drzaiusapelord on Thursday February 21, 2013 @12:15AM (#5255555)
I'm using Chrome not Chromium, and there's no save icon. Are you sure you aren't viewing this in a proprietary viewer? Typically you should be able to right click and get a save as option.
Re:Firefox introduces PDF viewer by jedbrown on Thursday February 21, 2013 @12:45AM (#5255678)
I just confirmed that the same occurs with Chrome 24.0.1312.52 (Official Build 175374). I'm quite sure that I am viewing it in a proprietary viewer. Specifically, the Chrome PDF Viewer. Surely you've seen these buttons before?

http://i.imgur.com/80dO12V.png

In both Chrome and Chromium, clicking save here does nothing and "Save As" is greyed out in the right-click context menu. "Print" works in Chrome (though it takes time to produce a preview before I can print to PDF), but locks up Chromium.

This anti-user bullshit is usually less prevalent in non-proprietary software.

Re:Firefox introduces PDF viewer by makomk on Thursday February 21, 2013 @07:09AM (#5256929)
So long as you use their proprietary, binary-only version of it. The open-source Chromium cannot display PDFs, and as far as I can tell there's no way to make it capable of doing so.
Re:Firefox introduces PDF viewer by dhconnelly on Wednesday February 20, 2013 @02:28PM (#5252653)
Gmail, Google Calendar, and Google Docs are huge JavaScript web apps that run in all modern browsers and have enormous user bases. They form a huge part of Google's business. Additionally, Google develops, maintains, and promotes popular JavaScript developer tools like Closure Compiler, AngularJS, and the Chrome dev tools.

Are you implying that everyone should just shut down all R&D in web technologies that compete with or don't use JavaScript?

Re:Firefox introduces PDF viewer by jlongster on Wednesday February 20, 2013 @02:40PM (#5252751)
Your last statement is way overstating the original remark about NaCL. Google has definitely been pushing PNaCL as the solution for running large, complex apps that are usually native (like 3d games, and things that require lots of computation) on the web. And there's no way PNaCL is going to be viable in the next decade, it takes way too long for everyone to agree & implement.

Gmail, docs, etc are complex, but don't require tons of computation. They just require good web technologies. Google's work in this area is awesome, but that doesn't mean we can't call out PNaCL as a bad technology to push.

Re:Firefox introduces PDF viewer by pifflesnort on Thursday February 21, 2013 @09:02AM (#5257399)
One of the major reasons PNaCL is "non-viable" are the comments like this one, calling it non-viable, and insisting on a JS-everywhere future.

If Mozilla et al spent half as much time trying to work with Google as they spend badmouthing everything that isn't JS, we'd have some solutions by now. These are political problems, not technical ones.

Re:Firefox introduces PDF viewer by khuey on Thursday February 21, 2013 @12:54PM (#5258837)
Re:Firefox introduces PDF viewer by pifflesnort on Thursday February 21, 2013 @06:01PM (#5261216)
Yes, I think that demonstrates my point, given that the author is Brendan Eich, CTO of Mozilla.

Mozilla has had years to contribute something meaningful to the conversation, and instead they've consistently badmouthed Google's efforts while watching the meteoric rise of native mobile development.

So now they've finally brought asm.js to the table; a Mozilla-flavored common bytecode, which is what we've been wanting for years, and exactly what Eich and Mozilla said was wrong for the web: http://en.wikipedia.org/wiki/Google_Native_Client#Reception

Fine -- if using javascript to encode a bytecode is what it takes for Mozilla to actually take the need for a common bytecode seriously (and admit that DOM/JS/HTML/CSS is perhaps not adequate), then I won't look a gift horse in the mouth. I just wish they'd figured out the need for post-JS webapps a little sooner.

Re:Firefox introduces PDF viewer by gcb0 on Wednesday February 20, 2013 @02:43PM (#5252773)
i think his gripe was more with proprietary solutions and not really !javascript, as you imply.

what you did would be the same as if i replied to you:

Are you implying that everyone should just shut down all R&D in web technologies and just choose between NaCl or ActiveX?

Re:Firefox introduces PDF viewer by EvanYou on Wednesday February 20, 2013 @10:07PM (#5255116)
While pdf.js is a cool project, the last paragraph sounds too biased. Despite being open source / in native javascript, Firefox is still late to the party in terms of viewing pdf in a browser. Coming up with a better solution TWO YEARS later than the competitor doesn't seem that impressive.
Re:Firefox introduces PDF viewer by cynwoody on Wednesday February 20, 2013 @04:00PM (#5253320)
> 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 by mccr8 on Wednesday February 20, 2013 @05:10PM (#5253714)
You can try it out for yourself here by loading this URL with Chrome: http://mozilla.github.com/pdf.js/web/viewer.html
Re:Firefox introduces PDF viewer by cynwoody on Wednesday February 20, 2013 @11:04PM (#5255298)
That's outstanding, even if the graphical figures still need work.
Re:Firefox introduces PDF viewer by DASD on Wednesday February 20, 2013 @01:44PM (#5252354)
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.
Re:Firefox introduces PDF viewer by rcthompson on Wednesday February 20, 2013 @02:14PM (#5252557)
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 by stock_toaster on Wednesday February 20, 2013 @03:00PM (#5252894)
Not only that, but being able to render via js would (and thus avoid calling out to any plugin code) would be able to take advantage of sandboxing too I imagine.
Re:Firefox introduces PDF viewer by pifflesnort on Thursday February 21, 2013 @09:19AM (#5257481)
How do you evaluate the PDF's JavaScript in an interpreter that is distinct from the renderer's?
Re:Firefox introduces PDF viewer by meaty on Wednesday February 20, 2013 @02:32PM (#5252690)
Different layers of abstraction. JavaScript embedded in a PDF probably turns up as a string after being parsed. It doesn't necessarily get eval'ed. It's turtles all the way down, until you say no.
Re:Firefox introduces PDF viewer by DASD on Wednesday February 20, 2013 @02:47PM (#5252811)
Let's hope there is the option to say no otherwise this couldn't be considered a general purpose viewer by some.
Re:Firefox introduces PDF viewer by pifflesnort on Thursday February 21, 2013 @08:59AM (#5257384)
You spent the first three paragraphs excusing its failings, and then the last one taking lot shots at Chrome/Google.

Since when has it been more important to meet some developer ideal (JS everywhere) than to provide the best possible product and experience to your customers?

Re:Firefox introduces PDF viewer by wslh on Wednesday February 20, 2013 @05:27PM (#5253817)
Yes but native client is conceptually an excellent and secure way to run native code.
Re:Firefox introduces PDF viewer by chr1 on Wednesday February 20, 2013 @03:04PM (#5252928)
It's really pretty good (and i've been using it for a while on firefox nightly), but unfortunately it uses lot's of memory, scolling past 4-5 pages on math heavy papers usually kills my old 1gb ram pc.
Re:Firefox introduces PDF viewer by Tloewald on Wednesday February 20, 2013 @07:01PM (#5254312)
If this based on pdf.js, because after being initially thrilled by it, we found it to be unusably buggy on all major browsers.
Re:Firefox introduces PDF viewer by jfb on Wednesday February 20, 2013 @06:32PM (#5254138)
To be fair, Reader does a lot more than simply display PDFs. Not of course that that makes PDF.js any less impressive.
Re:Firefox introduces PDF viewer by morphir on Thursday February 21, 2013 @08:19AM (#5257193)
it's not ready for prime just yet. Tried it with my AI-slides, and slide 12 does not render at all. http://www.idi.ntnu.no/emner/tdt4171/slides/Lecture6.pdf
Re:Firefox introduces PDF viewer by hakaaaaak on Thursday February 21, 2013 @12:51AM (#5255703)
"Google are pushing crap"

Is Google plural?