Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Firefox Mozilla Software News

Meet Firefox's Built-In PDF Reader 257

An anonymous reader writes "Not long ago, Mozilla coders announced that they were starting to build PDF.js, a way to display Acrobat documents in the browser using pure web code. No longer will you have to fight with an external PDF plug-in in Firefox. Development on PDF.js has progressed to the point now where you can take an early peek at it. Huzzah!"
This discussion has been archived. No new comments can be posted.

Meet Firefox's Built-In PDF Reader

Comments Filter:
  • Good (Score:4, Insightful)

    by steevven1 ( 1045978 ) on Friday October 28, 2011 @05:40PM (#37874864) Homepage
    I usually hate added features to my browser (I prefer a lightweight, fast browser), and Firefox especially has needed to go on a diet for the past year or two (and it has, successfully, since version 4), but I think that this is a pretty fundamental feature for a browser to have. After all, PDF's are everywhere on the 'net. Your browser should be able to show them to you. Gone are the days of saying "Oh, that link to an article I was barely interested in in the first place points to something in PDF format? Nevermind."
    • Re:Good (Score:5, Interesting)

      by Hatta ( 162192 ) on Friday October 28, 2011 @05:46PM (#37874926) Journal

      What's wrong with clicking the link and having the PDF launch in the viewer of your choice? This is significantly increasing browser footprint and attack surface for no appreciable benefit.

      • Re:Good (Score:5, Interesting)

        by bazald ( 886779 ) <bazald@@@zenipex...com> on Friday October 28, 2011 @05:50PM (#37874952) Homepage

        But it's not increasing the attack surface at all. If it's pure javascript, the interpreter is already there anyway. Any attack on PDF.js would exist in the interpreter independently of PDF.js. In fact, this reduces the attack surface by requiring one less program to accept arbitrary data from the network.

        • Not entirely true. Much of Firefox is written in JavaScript (this is , among other things, part of the reason you don't need separate versions of AdBlock Plus for each host OS and architecture). However, that JS runs at higher permissions than webpage content (for obvious reasons). If this PDF reader is also running at those higher permissions, then it is introducing a new parser of untrusted files into the browser.

          If it actually runs with the same permissions as any random script on a webpage, then you're

      • Waiting for a PDF to load externally takes a while and messes up the whole browsing flow -- can't open links in a background tab if they're going to grab hold of your screen and pop up a PDF viewer in front. Chrome's in-browser PDF viewer works great, loads so much faster than an external viewer.
        • by tepples ( 727027 )

          Waiting for a PDF to load externally takes a while and messes up the whole browsing flow -- can't open links in a background tab if they're going to grab hold of your screen and pop up a PDF viewer in front.

          If the PDF viewer raises and focuses itself when launched from your web browser, that's a window manager problem.

      • Re: (Score:3, Insightful)

        by steevven1 ( 1045978 )
        I'll respond to this with a quote from someone else: "If you have a link to something.jpg, would you rather it open in an image viewer in another application window? The ubiquity of PDFs makes them worthy of the same treatment as images."
        • Re:Good (Score:4, Insightful)

          by keytoe ( 91531 ) on Friday October 28, 2011 @07:09PM (#37875570) Homepage

          I'll respond to this with a quote from someone else: "If you have a link to something.jpg, would you rather it open in an image viewer in another application window? The ubiquity of PDFs makes them worthy of the same treatment as images."

          Except that images are inline elements that fit within the document model of a web page and PDF documents are separate ... er ... documents. Images and PDFs are used in completely different ways.

          • that, and with every 'in browser' PDF viewer i've used in the past 4 years, its sort of a dice roll. usually about a 2 in 6 chance that the browser crashes trying to fire up the PDF file.
            • usually about a 2 in 6 chance that the browser crashes trying to fire up the PDF file.

              You're either a PnP gamer, or a gambler, right?

      • by epine ( 68316 )

        What's wrong with clicking the link and having the PDF launch in the viewer of your choice? This is significantly increasing browser footprint and attack surface for no appreciable benefit.

        I've configured the majority of my web clients to use external PDF viewers in the past because there wasn't much benefit to running them inline as opaque applications in affordable housing. There's nothing wrong with being too old for school. However, if PDF behaved more like web content and integrated fully with Zoter

      • by BZ ( 40346 )

        The whole point of implementing in JS is to not increase attack surface: everything pdf.js does can already be done by web pages.

      • Because when you are comparing parts it's so much easier to have the PDFs open in tabs of the same window as the search that found them than having to open them in a seperate app, look at them and then find the browser window you were using again. Especially if you are working on windows which doesn't have virtual desktops.

        I just hope this new PDF system is actually fit for the purpose of looking at things like IC data sheets (which means it MUST support PDF bookmarks and it MUST NOT choke on large PDF file

      • by laffer1 ( 701823 )

        I can think of one benefit. On any platform that Firefox runs on, one can actually view a PDF. Adobe makes a reader for the big three platforms.. Windows, Mac, and Linux, but not for any others. There are certainly nice open source PDF viewers, but not all of them have a browser plugin. This also gives us a working PDF viewer on other architectures. Old PPC and Sparc boxes.. maybe new ARM and x86-64 systems.

    • by Anonymous Coward

      What Mozilla apparently doesn't realize is that there are serious problems with Firefox that should be fixed long, long before this sort of crap is added.

      1) The poor performance and the extreme memory usage. Yes, this is still a problem. It's easily reproducible with fresh Firefox installations. No, it's not a problem extensions. No, it's not a problem with plugins. No, it's not a problem with my computer (Chrome, Opera and Safari run just fine). The problem is solely with Firefox.

      2) Can the "UI designers".

      • by Vaphell ( 1489021 ) on Friday October 28, 2011 @06:19PM (#37875170)

        Memory:
        noscript, adblock, flashblock to cut down unnecessary bullshit
        http://kb.mozillazine.org/Browser.sessionhistory.max_total_viewers [mozillazine.org]

        Bring back the protocol in the URL bar:
        about:config -> browser.urlbar.trimURLs = false

        • by adolf ( 21054 )

          Bring back the protocol in the URL bar:
          about:config -> browser.urlbar.trimURLs = false

          I didn't even notice it was gone, but I'm pleased to have it back. Thanks!

          • by mqduck ( 232646 )

            Me either. But it doesn't seem to hide it if it's anything other than HTTP, so it's still unambiguous. I decided to leave the feature on.

      • by rimugu ( 701444 )

        You have to be kidding.

        Menu bar, Firefox Menu/Options/Menu bar
        Status bar, Ctrl+/

        You have already been answered about protocol, and I have not seen poor performance, memory usage could be better, but it is clear you are ignorant of Firefox and blowing it out of proportion.

      • 4) Stop trying to imitate Chrome. If we wanted to use a browser like Chrome, we'd fucking use Chrome! If we aren't using Chrome, it's probably because we want something different.

        Hey, Konqueror had integrated kpdf into the browser way before Chrome existed.

    • Opening PDF files in the browser is great and all, but I would be more interested in using this lib to programmatically create PDF files from what is in the browser. This would be particularly useful as svg gets wider adoption. Right now, the process requires conversion to canvas as an intermediate step.

    • by tyrione ( 134248 )
      Good? Just require merge Poppler stable into the Tree and you'll get a high quality engine. By all means use Javascript. That'll guarantee ISO 32000 certification. Poppler is getting major improvements to the tree and you jump ship for an interpreted option in-house? I've stopped developing and testing against Gecko based browsers. This only makes me glad I've focused on WebKit solutions.
  • Please God no! (Score:4, Insightful)

    by Spazmania ( 174582 ) on Friday October 28, 2011 @05:41PM (#37874880) Homepage

    I don't want PDFs to open in the web browser. I want to open them in Acrobat in another window. Let the browser be a browser and Acrobat be Acrobat!

    • I don't want PDFs to open in the web browser. I want to open them in Acrobat in another window. Let the browser be a browser and Acrobat be Acrobat!

      So you don't like googles feature of viewing pdfs in html? Personally I love not having to download the file and wait for the pdf viewer to instantiate itself. The main benefit being not having to worry about the latest pdf exploit ruining your day.

    • Re:Please God no! (Score:4, Insightful)

      by amicusNYCL ( 1538833 ) on Friday October 28, 2011 @06:14PM (#37875126)

      You realize that Acrobat is the #2 attack vector for Windows machines, right? It's right between Java and Flash. Why would you voluntarily use it when there are several other PDF readers which don't even show up on the attack vector charts? I was in a meeting today at the Maricopa County Community Colleges District office and I was pleasantly surprised to see that Foxit reader opened up whenever someone clicked a link to a PDF in IE. They use IE and still have enough sense to get Java and Acrobat off their machines.

      • I'm partial to SumatraPDF [kowalczyk.info] myself... lighter than foxit, without the installer grenade traps.
      • Well, the vulnerabilities in PDF, if I'm understanding it correctly, are largely a matter of bugs in Acrobat and the scripting abilities that Acrobat supports. Failing to implement the scripting alone would probably go a fair ways towards securely viewing PDFs.

    • Then don't use it. Whew, problem solved.

      (Valid) Criticism is useful. Personal preferences are irrelevant.

      • by Arlet ( 29997 )

        Personal preferences are irrelevant.

        Only if there's an option to keep your preferences. It seems that is has become fashionable for the designers to force their own personal preference on all the users, and remove options for customization.

    • I can't be the only person who remembers when images on the web pages had to be viewed with a separate application.
    • I don't want PDFs to open in the web browser. I want to open them in Acrobat in another window. Let the browser be a browser and Acrobat be Acrobat!

      That's fine, this is a Firefox addon: Just don't use it. Addons are optional.

    • I've got to agree, mostly (except for the Acrobat part - I find Bluebeam far more useful, though it's not free). I almost never want to open a PDF in the browser, because most PDFs are stuff I need to download and keep anyway.

    • I agree, but I don't need Acrobat. I already have a PDF viewer in Emacs. What I'd like is to open Emacs directly in firefox, then I can get PDF viewing for free. Come on, firefox devs! Complete program reuse is the Unix way!
    • fuck acrobat. how can a program that essentially just renders markup be 64.69 MB? i was so happy when chrome brought in pdf viewing.
  • Will they ... (Score:2, Interesting)

    by Anonymous Coward

    Will they include any way to turn off automated content within PDFs? What measures will they take to protect my privacy?

    May be the feature that drives me away from FF ...

  • I like the idea... (Score:4, Insightful)

    by rsilvergun ( 571051 ) on Friday October 28, 2011 @05:47PM (#37874932)
    But it scares me. PDFs are hideously complex. Can you really do this without opening a whole new world of security vulnerabilities? I guess it's in the JavaScript engine, and that's where the security is....

    On an upside, it's cool to see what sort of document processing is possible when you've got as many CPU cycles as you do these days :).
    • Consider that you can now run a linux virtual machine in javascript. Which you could use to launch a window manager and open the pdf into a native viewer.

      Document processing is tame compared to what is possible these days.

    • by philarete ( 1598473 ) on Friday October 28, 2011 @06:00PM (#37875026)
      The potential vulnerabilities are there whether the PDF is being opened in Acrobat or in the browser. Adobe Reader/Acrobat is one of the main ways that PCs get infected with malware. Comparing Adobe's security track record with that of Mozilla, I'd much prefer to let Firefox handle PDF viewing.
    • by arose ( 644256 )
      If it's implemented in sandboxed javascript it can't open any vulnerabilities that couldn't be exploited by any old webpage (unless you run noscript that is).
      • If it's implemented in sandbox javascript (...)

        It is, since the demo [github.com] runs as a normal web page, without requiring the installation of any addons.

        • by arose ( 644256 )
          I know the demo is, less sure about the extension. It might hook into the UI or whatnot.
    • by Darinbob ( 1142669 ) on Friday October 28, 2011 @07:38PM (#37875754)

      Step one make sure that it never ever writes to disk, uses the network, accesses DLLs. A reader should never write. Don't allow any operations that may be insecure and provide them as no-ops only. Any operations that are for display only are allowed, anything else should be highly suspect. Ie, go back to just what version 1 or 2 of PDF formats allowed.

      It is absolutely absurd and illogical that something called "Adobe Acrobat READER" has security flaws that allows it to WRITE. Display the document only, only allow rendering. If there are special features that MUST be used for some inane corporate use then require using a separate standalone PDF malware vector for this, but you don't need to provide that broken functionality in a limited browser version.

      • It's called Adobe Reader, because it reads PDF files, the notion that in this day and age you can have a program that doesn't write out its preferences somewhere is questionable at best. As soon as a program needs to write to disk for any purpose at all, there's going to be the possibility of it being exploited.

        I'm not sure where you got the idea that a reader wouldn't do any of those things. A program with any utility at all is going to write to the disk, use the network and/or access DLLS. Unless you're c

        • by Rich0 ( 548339 )

          This is why we need to improve access control policies. Right now all your processes run under the same privilege level - your user account. I have no issues with Acrobat/etc opening its preferences file - but it shouldn't have access to anything else except for read-access to the file it was invoked upon.

          What you need is a privilege model that is more granular than the user. Having write access to your home directory isn't really much more secure than running as root on a single user machine.

          Android work

        • The program should write out its preferences. The pdf file you're reading should not do this.

    • by Jiro ( 131519 )

      Never mind security, how about speed? Is a PDF reader written in Javascript going to be as fast as a PDF reader written in a standard compiled language (which is already quite slow even on a modern machine)?

      • by butlerm ( 3112 )

        Is a PDF reader written in Javascript going to be as fast as a PDF reader written in a standard compiled language?

        No.

    • by Eil ( 82413 )

      My big concern is that by adding seamless PDF rendering to browsers, we're inadvertently encouraging the less clueful to start designing web sites in PDF rather than the old, cumbersome, finicky HTML/CSS/Javascript combo.

  • It does work, but it's still alpha quality at best.

    Page layout is messed up.

  • Don't mean to knock Mozilla's hard work here, but how about tackling this problem in the other direction: get rid of PDFs entirely.

    Sure, PDFs are great for printing, but who prints anymore? It's 2011.

    And before you say "well you can fill out forms with PDF" might I remind you that you can do the same on the web, in plain ol' HTML.

    • by amicusNYCL ( 1538833 ) on Friday October 28, 2011 @06:17PM (#37875154)

      Sure, PDFs are great for printing, but who prints anymore? It's 2011.

      You're being serious, right? You think that companies everywhere dumped their printers in the garbage why?

    • by Jeremy Erwin ( 2054 ) on Friday October 28, 2011 @06:58PM (#37875496) Journal

      PDFs are great for scientific papers. The equations and footnotes are formatted correctly, I can cross reference 30 or 40 pages at once, without trying to click back and forth through ad laden pages, and I can see two pages at once on my wide screen monitor, or go back to a single page if I want to make Preview.app's window smaller.

      The alternatives based on Flash are horrible-- the anti-aliasing is subpar, the window can't be resized and so on.

      • by melikamp ( 631205 ) on Friday October 28, 2011 @07:40PM (#37875772) Homepage Journal

        PDFs are great for scientific papers.

        Only for printing. The difference between PDF (produced from something like LaTeX) and XHTML+MATHML+SVG is that

        (1) PDF is paginated nicely, which is essential for printing, and an obvious minus for on-screen viewing.

        (2) PDF has lost the content layer [w3.org], which is nearly irrelevant for printing, and unforgivable for on-screen viewing.

        What you really need for scientific papers is a large page that can flexibly display full color text and images. PDF is one of the best ways to describe a printable version, but it's a far cry from the best way to describe an on-line document .

      • by Raenex ( 947668 )

        PDFs don't flow text, which makes them crap for online reading. I also really hate when the PDF author decides he wants two columns, which really sucks when you have to scroll down and then up to continue reading.

    • by MagicM ( 85041 )

      PDFs are great for printing, but who prints anymore?

      I do. Better yet, I use PDF to print stamps [usps.com] so that I can send my printed PDF to someone else.

      • by jrumney ( 197329 )
        I'll be impressed if PDF.js can handle this. I don't know about the USPS version, but Royal Mail's stamp printing relies on security features of PDF that do not work in any third party PDF reader I have seen. Which is a pain because Adobe Acrobat is a bloated pile of security vulnerabilities that manages to freeze Firefox while PDF documents load.
    • Sure, PDFs are great for printing, but who prints anymore? It's 2011.

      I do because when reading a long document I preffer to do it on paper than on screen ;)

      get rid of PDFs entirely.

      Going from printed to pdf was a relatively easy transition. Just install a printer driver or a plugin in your document preperation system and you are good to go. For big documents you probablly want to convert the TOC to bookmarks but even that isn't too big a deal (for latex users the hyperref package can do it and IIRC for word users the hyperref package can do it). Even paper documents could be converted to PDF if nece

  • Instead of spending all the time supporting pdfs, why not just ditch the format entirely and make documents with HTML?
    • For the same reason web developers still need to support IE6: people won't stop using certain software/formats just because we really wish they wouldn't, and we have to deal with it.

    • Say I have an element <h3 id="something">something</h3> on one page of a document. On another page of the same document, how do I get the browser to calculate the page number of this element so I can write, for example, "See section 'something' (p. 5)"?
      • For a web document? You hyperlink it. "See section '<a href="section.html#something">something</a>."

        PDF is great for documents that will be printed out, though. Unlike what paper-free idealists think, this is a number which is substantially larger than zero -- so the format does have its place. If you're providing it via the web, though, it would generally be polite to provide both an HTML copy and a PDF copy.

  • I like how Chrome can display most PDFs right in the browser. No troublesome plugin required.

    The last few versions of Acrobat Reader have so much bloat and need to be updated so often, it is nearly more trouble than it's worth.

    To have Firefox display PDF directly is wonderful news. Good job!

    • If you get a real reader with editing capabilities you'd find the experience much better. Adobe is not the best our there; Bluebeam is awesome if you need to make notations in PDFs. I wish they had a version for tablets.

  • by knorthern knight ( 513660 ) on Friday October 28, 2011 @06:52PM (#37875452)

    PDF started out as "Portable Display Format" that showed you what a document would look like if you sent it to a decent printer.. If it had stayed that way, it would be ideal. Unfortunately Adobe succumbed to the Microsoft/Mozilla "features disease". The "latest greatest" versions now support javascript, live URLs that you can click and go to. And then there's "/launch" (it's not a security hole, it's a feature). Not to mention support for schlockwave trash.

    Over the years people have complained about how every new version of Adobe Reader is more bloated, and takes longer to load than its predecessor. If Firefox offers a lightweight PDF ***READER***, I'm all for it. But puhlease, not all the stupid features in Adobe's version. Speaking of versions, the one feature I strongly suggest is that Mozilla allows its PDF engine to lie about what it is. Just like asshole webdesigners who hardcode Internet-Explorer-only into their web pages, I'm sure there are idiots who hardcode their webpages to only allow Adobe Reader above a certain version to access their PDF documents.

    • I'm pretty sure that's not true. PDF has been an open standard for a few years now, and I'm not sure how any document would know what reader was trying to read it anyways.

      • On April 14, this year, Wisconsin efile tax site required a specific version or higher of Adobe Reader; no lesser versions, no alternatives.

    • by Rich0 ( 548339 )

      Yup - I think that the Reader team was in competition with the Photoshop team to see which app could display more plugin loading messages on its startup banner...

  • That does it. (Score:3, Insightful)

    by Fuzzums ( 250400 ) on Friday October 28, 2011 @06:59PM (#37875508) Homepage

    If this finds it's way into FF, I'll finally will ditch FF.
    They are WAY of the KISS path. Updates every week, new GUI every 6 weeks. FRELL THAT!
    I want long term stability in my browser. Not this crap.

    FF. Time to branch the development. One for BS and one for KISS. I'll install the plugins I need.
    Oh. About:plugins. Stop breaking them every 3 months.

    • Updates every week

      I know, it's so terrible getting regular security updates.

      new GUI every 6 weeks

      Funny, after I installed FF4 I reset the UI to FF3.5 style. Now I'm on Nightly 10 and it looks the same.

      I want long term stability in my browser. Not this crap.

      Fortunately it's javascript, so it won't impact the browser itself at all.

      I'll install the plugins I need.

      Enjoy your Adobe-introduced security holes.

      Oh. About:plugins. Stop breaking them every 3 months.

      The single biggest problem is addon developers not bo

  • ...for adding a capability Safari has had for over five years. :)

    But seriously - the sooner we get to a point where all major browsers have this capability built-in, the sooner we can be free of the abomination that is "Acrobat plugin."

Do molecular biologists wear designer genes?

Working...