14 ms·
Firefox introduces PDF viewer
- AshleysBrain 14y agoIs this based on pdf.js? I couldn't seem to find out quickly. If so, very cool! Edit: I was being lazy, it definitely is. Very nice that it's plugin-free and a pure HTML5 solution.
- stuff4ben 14y agoWhy is this news except the fact that Chrome has had this for years? Was Adobe paying Mozilla in the same way that Google paid them for the search bar preference?
- AshleysBrain 14y agoI think the point is (from my other comment) this doesn't use a plugin, so is more secure (no Adobe security problems). It's based on pdf.js if you want to find out more.
- unwiredben 14y agoChrome's support is based on a licensed copy of FoxIt reader that they bundle in their binary. This also means that Chromium doesn't support it. The Firefox one is all open-source, as well as being based on pdf.js.
- joshmoz 14y agoAdobe was not paying Mozilla for anything like that. Chrome simply includes a paid closed-source product (FoxIt, iirc). This was and is not an option for Mozilla for multiple reasons. It took Mozilla a while to get here, which is unfortunate, but the result is an open-source PDF reader that doesn't add yet another binary rendering engine to the browser (think security, hack-ability). Creating it made Gecko and the web platform better, because it pushed us. There is more work to do, but it's a great start and a welcome change to how these features are implemented. A bit more info in a blog post that I wrote: https://boomswaggerboom.wordpress.com/2013/02/19/exciting-stuff-firefox-19s-built-in-pdf-reader/ https://boomswaggerboom.wordpress.com/2013/02/19/exciting-st...
- Ygg2 14y agoInterestingly, there are also a prototype Flash in JavaScript called Shumway: https://github.com/mozilla/shumway https://github.com/mozilla/shumway And an IIUC a DOM renderer in JS https://github.com/andreasgal/dom.js/ https://github.com/andreasgal/dom.js/ I don't know if PDF.js will ever reach full PDF compatibility (with all it's weird forms and other stuff), but I do hope so. With a liberal licence I can totally see people embedding pdf.js to render their pdfs on site.
- green_fox 14y agoThe experience on Android phones is solid but this core feature is really late to the game. I love firefox but cant keep using a browser thats always playing catch-up
- datr 14y agoI really like Chrome and use it when developing just for webkit inspector but I can't switch to it for regular browsing as I still feel like Chrome can't match the browsing experience of FF. For example: Tab Management In firefox I can much more easily have dozens of tags without them all becoming squished. Instead I get scroll bars and a drop down menu. With tab mix plus, tabs which I haven't read yet are highlighted. I also have a close tabs to the left option in the context menu (which I really love). Adverts Adblock in firefox seems to be much more stable than the chrome alternative and just does a better job generally of blocking adverts. (This one might be solved by the likes of privoxy but then I lose the tight integration with the browser.) Password Management I'm a regular user of last pass but in chrome it can't integrate with the http auth dialog which means I'm forced to open up my vault and copy and paste my credential manually which is a huge hassle. I really like Chrome and I'd love to use it all the time but these things (and a few others) prevent me from doing so. Does anyone know if there are any chrome extensions which address these issues?
- robin_reala 14y agoRe: your LastPass Chrome problem, you need to install the extension with a binary component (there are two on LastPass's site)
- aviraldg 14y agoLove it, but unlike Chrome's embedded PDF reader, it can't "stream" PDFs (a dealbreaker for people viewing media-heavy PDFs on slower connections)
- baudehlo 14y agoThat'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.
- jevinskie 14y agoYou could try to progressively render the file, pausing when a required forward reference isn't within the data you have downloaded so far.
- jammmuel 14y agoThat seems to be what they do, in my experience.
- deleted 14y ago[deleted]
- benatkin 14y agoengineers gonna engineer
- hackmiester 14y agoWell, I imagine that they download the file in the background, and if the viewer seeks to a non-downloaded part of the file, then it just blocks with "Loading" until that part is downloaded.
- dunham 14y ago"Linearized" PDFs have extra info up front to allow streaming and random access (via range requests).
- hosay123 14y agoIt'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!
- opinali 14y agoPlease 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 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.
- Ygg2 14y agoThey 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.
- 14y ago
- johansch 14y agoIt fails with the 4th google hit for "sample pdf": http://www.inkwelleditorial.com/pdfSample.pdf http://www.inkwelleditorial.com/pdfSample.pdf (The main difference I see with Firefox 19 on win7 is that it loads pages significantly faster.)
- chaud 14y agoSeems to render fine for me in FF20 on W7: http://i.imgur.com/G5PPEbN.jpg http://i.imgur.com/G5PPEbN.jpg
- deleted 14y ago[deleted]
- cpeterso 14y agoThanks for mentioning this problem. I filed a bug for this issue: https://bugzil.la/843220 https://bugzil.la/843220
- kbrosnan 14y agoIs this still an issue with the development version? https://github.com/mozilla/pdf.js#extension https://github.com/mozilla/pdf.js#extension I tested it on Windows and it 'works for me'.
- alok-g 14y agoI had dedicated PDF plugin installed [1]. They had no reason to switch to Firefox-native PDF rendering as the default for PDFs before getting some maturity to it. The very first PDF I encountered [2] won't render fine in it though it does very well in the dedicated PDF application [1]. [1] http://www.certifiedmastertech.com/1410/mechanicssecretspdf1a http://www.certifiedmastertech.com/1410/mechanicssecretspdf1... [2] http://www.tracker-software.com/product/pdf-xchange-viewer http://www.tracker-software.com/product/pdf-xchange-viewer
- cpeterso 14y agoWhat rendering problem do you see with the "mechanics' secrets" PDF? AFAICT, it looks fine with Firefox 22 on OSX. What OS and Firefox version are you using?
- av500 14y agowhat happened to doing one thing and doing that well? what is next, office documents?
- icebraining 14y agoIt does only one thing. Firefox doesn't depend on PDF.js and vice-versa, they're just bundled together.
- brudgers 14y agoI've been using it for about a month. It's my default PDF viewer, on my desktop - though sometimes it has choked on a file, and search has been an issue on large files. Generally though, it's a good solution that doesn't require dealing with Adobe updates all the time.
- Aardwolf 14y agoThanks for doing this, but it is not working well for me! It takes way longer to load than a normal PDF viewer, is slow, and basically I gave up and closed it when pages were still black, or white, with a rotating loading indicator, minutes after a regular PDF viewer already showed it. This in Linux. Thanks!
- homer-simpson 14y agoWhat I don't understand is why Google doesn't have an open source PDF viewer? I mean, Chromium renders OpenGL, decodes movies, contains fastest JavaScript VM and it cannot view PDFs? Given what they did to JavaScript speed, can you imagine what viewer they would be capable of producing of? At least they should join Mozilla on improving pdf.js, IMO...
- deleted 14y ago[deleted]
- mccr8 14y agoChrome already has its own PDF viewer, presumably implemented in C or C++ or whatever, so they probably don't care about making it available for Chromium. Perhaps they bought the rights to the source code they based it on, and are unable to open source it.
- joshmoz 14y agoGoogle pays to ship FoxIt's closed-source PDF engine with Chrome.
- shmerl 14y agoIt's nice to have such an option, but it feels significantly less snappy than Kparts plugin in KDE which wraps Okular into Firefox.
- CamperBob2 14y agoTrue, as with plain Adobe Reader. I spend a large part of my day reading .PDFs, both in and out of my browser, and Firefox became a much less effective "power tool" when they took the liberty of disabling the Reader plugin. I couldn't care less how long it takes to load a .PDF -- snappy rendering and navigation is everything, and you don't get that from JavaScript. It took a surprising (to me) amount of hacking to re-enable native .PDF rendering. As far as I'm concerned, pdf.js is one of those increasingly-common cases where Mozilla has unilaterally decided that it knows Just What I Need, and followed up by attempting to impose it without offering me a choice.
- Spittie 14y agoI don't know what you did, but i can easily change that by changing the default action for PDF files in preferences -> Applications. I've been using PDF.js myself for i think a year now (Used to install it directly from their Github page), and it's a great reader if you aren't an heavy PDF user. I barely have to open a PDF, and when i do it's usually just text and images, not any fancy stuff. And i guess most computer users are just like me. If you open PDFs all day, and are a power user, i guess that nothing can replace a good standalone reader. It's still kinda slow, but it has done some incredible progresses in the year i've been using it. And i'm sure it will just get better and better.
- jimmaswell 14y agoI didn't have any issues at all enabling my foxit reader plugin for firefox. I actually had to specifically enable pdfjs in about:config to get it to run.
- shmerl 14y agoIt didn't take me much hacking to enable native PDF plugin back. Searching in about:config for "pdf" quickly revealed pdfjs.disabled setting, which I set to true - and that's it.
- klrr 14y agoWhat, this is not what a web browser is supposed to do.
- twoodfin 14y agoIf you want to try PDF.js from your current browser, here's a demo: http://mozilla.github.com/pdf.js/web/viewer.html 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.
- comex 14y agoAlmost bearable in MobileSafari on my iPhone. Almost... well, I guess the limiting factors are mostly under Apple's control, not pdf.js's.
- comex 14y agoSelf-reply: judging by its performance in desktop Safari versus other browsers, this is really the fault of Apple's (closed source, so I can't really properly diagnose) rendering code - the other browsers performed much better.
- duaneb 14y agoLooks much better than I imagined. Also painfully slow.
- wildmXranat 14y agoI've got an i5 that runs it smooth like butter.
- SteveMoody73 14y agoMost of the PDFs i read are electronics datasheets and they don't look half as good and it also seems to be missing the bookmarks as well. Scrolling through pages also seemed to take a long time. I think i will have stick to adobe reader for now
- fiatpandas 14y agoThis is really impressive. I tried in both my FF 18 and Chromium, it seems to work fine in both, although I prefer the font rendering in Firefox. This truly is an amazing use of JS.
- stcredzero 14y agoI would love to have a PDF viewer app for OS X based on PDF.js. Better still if it could be sandboxed and have other enhanced security. Just tried out Firefox 19, and the PDF reader is good. Responsive enough, with just the barest hint of render lag. Minor nit: Firefox isn't currently registered as handling PDF, but will still open it happily. EDIT: I have Firefox as my OS X Mountain Lion's PDF viewer app now. Works quite well!
- jonknee 14y agoAny particular reason? OS X natively supports PDFs (and is both much faster and more complete than pdf.js).
- stcredzero 14y agoPreview has had a history of security holes. PDF.js would at least be immune to buffer overflow exploits.
- Create 14y ago...and it displays your visited sites in a grand panorama on the canvas in a new tab, despite having asked for always private browsing. It could be a regression of both the browser, and the unit test, which isn't such a good news.
- nephyrin 14y agoIf this is the case for you please file a bug - a lot of private browsing changes have been occurring under the hood in preparation for proper per-window private browsing in FF21, so it's very possible a regression snuck in :(
- dbaupp 14y agoThe visited sites view is possible to disable (either under settings, or, at the very least, about:config + search newtabpage (or something along those lines, I can neither remember or test it)), and there is a small symbol in the top right corner that hides the site display. (Admittedly none of those solve the underlying problem of history being preserved.)
- Nux 14y agoImpressive piece of Javascript, but it's quite heavy on my CPU. I will continue using Evince for the time being.
- forgetcolor 14y agojust 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.
- soapdog 14y agoPDF.js rocks! Now, stay tunned for ASM.js because that too will rock (once it is ready). link: http://asmjs.org/ http://asmjs.org/
- ucpete 14y agoSerious question: what took so long?!
- biot 14y agoPerhaps they gave up waiting for your implementation.
- gmac 14y agoI've been using this for a while in Firefox beta, and it's generally really good. I have two small problems with it, which perhaps won't be too hard to fix: 1. PDFs of old academic papers that are just strung-together CCITT (fax) compressed monochrome scans. Preview.app, Adobe Reader and Chrome resample those to give a readable quasi-anti-aliased effect. PDF.js makes the text jaggy and spindly and hard to read. 2. No back/forward navigation.
- ozten 14y agoI've been enjoying Pdf.js for months, as I use Aurora as my main browser. Aurora[1] is the the first step before Firefox Beta. If you want to use awesome features like pdf.js earlier... get on Aurora. It has been surprisingly stable channel for pre-beta code. [1] http://www.mozilla.org/en-US/firefox/aurora/ http://www.mozilla.org/en-US/firefox/aurora/
- mariusmg 14y agoIs there anyway to change the background/foreground color ?
- kunai 14y agoBefore 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.
- eumenides1 14y agoDumb 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.
- nephyrin 14y agoNothing! pdf.js is already a part of the Octane benchmark and works well in chrome: http://mozilla.github.com/pdf.js/web/viewer.html http://mozilla.github.com/pdf.js/web/viewer.html Mozilla is about moving the web forward, not just beating the other guy, so I don't imagine there'd be any gripe with Google picking up pdf.js in chrome.
- fafner 14y agoThere is already a Chromium plugin for pdf.js available. I hope Google starts using pdf.js so far it's better than the Chrome pdf viewer except for the startup time.
- keeperofdakeys 14y agoA lot of people are under the misconception that Firefox and Chrome are rivals, but the opposite is the case. They both have the motto of "furthering the web", however you want to interpret it. As for Reader, Adobe probably don't really care if others come along. Acrobat is the main product, and the fact that other PDF readers exist just gives people more reason to buy it. PDF is also an incredibly large specification, full of crazy features, and I think Reader might be the only one that implements all of this functionality.
- Millennium 14y agoNothing stops Chrome, or even IE, from adopting PDF.js. Not even the license (Apache). Personally, I'd like to see it happen.
- pifflesnort 14y agoThat depends on whether they think it mathes the native implementation in compatibility, performance, and price. My hope is that they wouldn't replace the current implementation simply because the JS implementation is free, and the JS implementation is never going to be as fast as an effecient native implementation, and its always going to be more difficult to write.
- hoodoof 14y agoWe have a major in house application that displays PDF files as a core part of its functionality. The Firefox PDF reader is very slow compared to Chrome's. Also, the second and subsequent PDF files you click on do not commence the display at the top of the page, the appear to commence display somewhere down the page, I'm guessing maybe at the position that the previous PDF scrolled to. So immediately you need to pull the scrollbar back to the top before you can start reading the PDF. So for now, just on speed alone we'll pass on the Firefox PDF reader.
- unix-dude 14y agoWorks well, looks sleek, and only randomly locked up once (To be fair, I had tons of tabs open). Good job!
- ww520 14y agoAs a pure Javascript solution, it can run on a wide variety of platforms, as far as the browsers are running.
- magg 14y agohow is pdf.js gonna be updated in firefox... i was using the dev version add-on of pdf.js and seems to work better than the one shipped in FF19
- curiousdannii 14y agoDon't miss the announcement that Firefox for Android now supports ARMv6! Many ~$100 Android phones now have the option of a better browser!
- iyulaev 14y agoInteresting. I was wondering why I had to re-enable FoxIt viewer after the latest Firefox update. Maybe it works well for some PDFs, but the first two I happened to open were formatted pretty badly.
- Aissen 14y agoI've been using it for while (it shipped before but wasn't enabled by default; which I did). It works great most of the time, and is hassle-free. It's also likely safer to use. Now, if only Gmail would let me preview attachments in it. They do it for Chrome's plugin. I tried messing with the URL arguments, but it seems the Gmail server won't even give you the inline (ie not a download) version of the PDF if your browser doesn't pretent to be Chrome.
- arthurrr 14y agoIf this is the future of computing, then I quit. I don't want to play anymore.
- skinnynerd 14y agoThis is really amazing, but I wish these two browsers would be pushing for a FOSS version of PDF instead. I do not think openXPS is entirely FOSS but it is a good place to start looking for an alternative. Here is an xps file on the web to see how your browser handles it: http://www.rosebudschooldist.com/images/Feb%20Cal%202013.xps http://www.rosebudschooldist.com/images/Feb%20Cal%202013.xps