Firefox 14 Gets Built-In PDF Reader PDF.js - gHacks Tech News

Firefox 14 Gets Built-In PDF Reader PDF.js

Browser plugins may soon become a dying form of adding functionality to web browsers. We are already seeing first signs of that, for instance with Chrome's built-in pdf reader, or the drive towards HTML5 video and media in general. The biggest issue with plugins, besides compatibility, is security, and here the need to keep plugins up to date to avoid attacks that exploit known vulnerabilities that have already been fixed in the latest plugin versions.

While there have been some attempts to inform the user when plugins are not up to date, it is still nothing that prevents users from running outdated plugin versions on their computer.

Mozilla has now started to integrate a native PDF reader into Firefox 14 versions. We have talked about pdf.js before, a script that is rendering PDF with HTML5 and JavaScript. While it may not look that different from Google Chrome's internal pdf reader, it is not the same thing.

Andreas Gal, one of the authors of pdf.js, highlighted some of the benefits in a blog post in 2011.

Displaying PDFs directly in the browser would definitely improve the user’s experience. There are literally millions (billions?) of PDFs floating around the web, and on many devices loading PDFs switches to a different application (e.g. Preview on OS X and PDF View on Android). Also, external PDF readers and many plugins don’t support important PDF features well, including content links and fetch-as-you-go (HTTP range requests).

The traditional approach to rendering PDFs in a browser is to use a native-code plugin, either Adobe’s own PDF Reader or other commercial renderers, or some open source alternative (e.g. poppler). From a security perspective, this enlarges the trusted code base, and because of that Google’s Chrome browser goes through quite some pain to sandbox the PDF renderer to avoid code injection attacks. An HTML5-based implementation is completely immune to this class of problems.

Firefox 14, which is currently available in the Nightly channel, includes the pdf reader already. It is listed in the extensions menu of the browser, and deactivated by default. Firefox users who'd like to test the reader capabilities need to enable it first, before they disable any plugins in the browser with pdf reading capabilities.

firefox pdf.js reader

The pdf reader opens pdf documents in browse tab. A small toolbar at the top allows you to go to a specific page, change the zoom level, print the document, download it, or bookmark the current location. It is quality-wise not on pair with Adobe Reader's plugin, but still ok and comparable to Google Chrome's pdf reader.

Firefox users who would like to try the extension right now can install a stable or nightly version of it from the project site. And yes, it works in all recent versions of the Firefox browser. (via Sören Hentzschel)

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. Midnight said on March 23, 2012 at 11:18 am
    Reply

    Interesting news. Just wondering how this compares to PDF Download, from Nitro PDF, which I’ve been using for the longest time.

    I have the Add on as well as the Plug in, which seem to perform very well with all PDF files. Fully compatible with Firefox UX (Nightly) 14.0a1.

    Any thoughts, Martin? :)

    1. Martin Brinkmann said on March 23, 2012 at 11:39 am
      Reply

      While I have never used Nitro PDF in the browser, I’d like to keep my browser as plugin-free as possible. Then again, I do not read pdf documents in the browser at all, prefer a local program for that.

      1. Midnight said on March 23, 2012 at 11:51 am
        Reply

        With Download PDF, you can chose to either Save the PDF or open the file in a separate PDF window.
        It doesn’t open any PDFs in the Browser, unlike what PDF.js does, or is suppose to do!

        I managed to get the .js Add on installed and uninstalled Download PDF as well as the Plug in.

        Like you, I’m not too keen on Plug ins, so let’s see what this new feature does.

        Thanks for the info. As always, very interesting!

      2. Martin Brinkmann said on March 23, 2012 at 12:22 pm
        Reply

        So it is just a shortcut. You can save pdf documents using the browser controls as well, so only the opening would be faster, unless you associate pdf documents with a pdf reader directly.

  2. Shatimi said on March 23, 2012 at 11:19 am
    Reply

    That’s why I’ll use Palemoon. The last thing I need in a browser is a PDF reader. What else? An e-mail client? An IRC chat? A news reader?

    …oops, forgot about Seamonkey…by Mozilla :)

    1. Martin Brinkmann said on March 23, 2012 at 11:27 am
      Reply

      Well you can disable it, and probably even uninstall it. Not sure though it it will be integrated into the browser natively at one point in the future.

      1. Midnight said on March 23, 2012 at 11:29 am
        Reply

        What’s going on, here?
        I go to the Mozilla Add on page to download the Extension and it says:
        Not available for Firefox 14.01a!!!

        Are they kidding or what? LOL!!

      2. Martin Brinkmann said on March 23, 2012 at 11:37 am
        Reply

        Did you go to Github and download it from there?

    2. Midnight said on March 23, 2012 at 11:31 am
      Reply

      Palemoon is merely a Firefox clone. Same source code, but a different name!
      Best to use the real thing, with only the Add ons that you want!

  3. ódio said on March 23, 2012 at 12:52 pm
    Reply

    useful if you only want to check some info, some google result as pdf… you dont need to download anything, just open in a tab.

    1. Martin Brinkmann said on March 23, 2012 at 1:20 pm
      Reply

      I prefer to download as I have the information available locally then

  4. left said on March 23, 2012 at 1:02 pm
    Reply

    Very interesting – thanks for sharing it. Any idea if this concept can integrate with Opera?

    1. Martin Brinkmann said on March 23, 2012 at 1:23 pm
      Reply

      Well the development project is making available versions for Firefox and Chrome, so it should in theory work in other browsers as well. If they plan on adding support, I have no idea.

  5. Jim said on March 23, 2012 at 2:35 pm
    Reply

    Two words: Feature Creep. Does anyone actually read PDFs in their browser? Seems like they have a solution without a problem.

    I while I can sort of understand the move away from plug-ins, I can’t say I’m happy about it. The ability to add/remove functionality to the browser was one of Mozilla’s attractions in the first place. Pretty soon there will be little reason to use anything other than IE. Why go to the trouble of installing a different browser if it doesn’t provide any benefit?

    1. Simon said on March 23, 2012 at 6:38 pm
      Reply

      I read pdf’s in my browser :) and I know many of my friends do it to
      and if you don’t want it, you can always disable it, and if you prefer an other pdf reader, you can still install another one. firefox will still be the most customizable browser so it still provides benefit. the ability to add/remove functionality hasn’t gone and won’t go

  6. Khai said on March 23, 2012 at 2:45 pm
    Reply

    so long as you can turn it off.
    rather have a full featured seperate reader…

  7. Robert Palmar said on March 23, 2012 at 7:42 pm
    Reply

    I use this Greasemonkey script to seamlessly read PDF’s
    which also gives the option to download the original:
    http://userscripts.org/scripts/show/59557

  8. Ken Saunders said on March 23, 2012 at 8:15 pm
    Reply

    “Then again, I do not read pdf documents in the browser at all, prefer a local program for that.”

    I’ve done the same for many years but mostly because local programs always opened and rendered them quicker.

    I personally like Mozilla’s version and with it being theirs and not Adobe’s (or other), they can keep it updated, safer, and faster.

    I also use few plugins. I actually only have two enabled.
    Extensions, well, they’re a different story. I have 56 enabled and always looking for more.

  9. Kise said on April 1, 2012 at 10:04 am
    Reply

    the new PDF.js seems to have problem with UTF, or arabic in general, the rendering doesnt look good at all

  10. asd said on July 19, 2012 at 2:24 pm
    Reply

    How exactly is the PDF reader integrated into Firefox 14, if you have to download it as a “plugin”, “addon” or whatever… Way to add confusion.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.