Slashdot Mirror


Meet Firefox's Built-In PDF Reader

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!"

30 of 257 comments (clear)

  1. Good by steevven1 · · Score: 4, Insightful

    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."

    1. Re:Good by Hatta · · Score: 4, Interesting

      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.

      --
      Give me Classic Slashdot or give me death!
    2. Re:Good by bazald · · Score: 5, Interesting

      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.

      --
      Insert self-referential sig here.
    3. Re:Good by Shoe+Puppet · · Score: 5, Funny

      In Mozilla Firefox, Javascript interprets PDF!

      --
      (+1, Disagree)
    4. Re:Good by Gavagai80 · · Score: 2

      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.

      --
      This space intentionally left blank
    5. Re:Good by steevven1 · · Score: 3, Insightful

      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."

    6. Re:Good by tepples · · Score: 2

      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.

    7. Re:Good by keytoe · · Score: 3, Insightful

      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.

    8. Re:Good by FatdogHaiku · · Score: 2, Informative

      In Mozilla Firefox, Javascript interprets PDF!

      Aww, come on mods! That's the first "In Soviet Russia" spin-off joke that was funny and insightful and informative... possibly ever!
      and there it sits at 1...

      --
      You have the right to remain sentient. If you give up the right to remain sentient, you will be elected to public office
    9. Re:Good by epine · · Score: 2

      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 Zotero, Session Saver, AdBlock, and NoSquint the benefits would be highly appreciable.

      I've grown fond of having the ability to remove any image (or logo) from a document I'm reading in Firefox by whichever of my multitudinous plug-ins added "remove this object" to my popup context menu.

      Neither am I particularly fond after a system restart of having to rearrange my PDF windows on their habitual desktops, after fighting round one with FF.

      From How Netflix Lost 800,000 Members, and Good Will

      Reed Hastings was soaking in a hot tub with a friend last month when he shared a secret [doomed plan]. "That is awful," the friend, who was also a Netflix subscriber, told him under a starry sky in the Bay Area, according to Mr. Hastings. "I don't want to deal with two accounts."

      In fact, I've always hated that PDF was a cloistered universe. I'll be much happier when it's demoted to just another www markup language and treated as such.

      But don't feel bad, Reed couldn't see it either.

  2. Please God no! by Spazmania · · Score: 4, Insightful

    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!

    --
    Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
    1. Re:Please God no! by Spazmania · · Score: 2

      If I was an Adobe person I'd want Acrobat to open in the browser window. No. No. No. A thousand times No. Get this crap out of my browser!

      --
      Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
    2. Re:Please God no! by amicusNYCL · · Score: 3, Insightful

      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.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    3. Re:Please God no! by larry+bagina · · Score: 2

      I can't be the only person who remembers when images on the web pages had to be viewed with a separate application.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

  3. Will they ... by Anonymous Coward · · Score: 2, Interesting

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

  4. I like the idea... by rsilvergun · · Score: 3, Insightful

    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 :).

    --
    Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
    1. Re:I like the idea... by philarete · · Score: 4, Insightful

      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.

    2. Re:I like the idea... by Darinbob · · Score: 3, Insightful

      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.

  5. I tried this days ago. by mhh91 · · Score: 2

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

    Page layout is messed up.

  6. There are real problems to solve first, Mozilla! by Anonymous Coward · · Score: 2, Insightful

    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". The Firefox UI has been completely trash since Firefox 4. It is much less usable than earlier releases. Bring back the status bar. Bring back the menu bar. Bring back the protocol in the URL bar. Don't make us install extensions or resort to other hacks just to bring back this basic and integral functionality!

    3) Fix the fucking auto-update process and the releases so that extensions don't break near-constantly!

    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.

    For crying out loud, Mozilla, fix these real issues that affect every user before adding useless crap like this PDF nonsense to Firefox.

  7. Re:How about eradicating PDFs instead? by amicusNYCL · · Score: 4, Insightful

    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?

    --
    "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
  8. Re:There are real problems to solve first, Mozilla by Vaphell · · Score: 4, Informative

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

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

  9. Depends on what "features" Firefox enables by knorthern+knight · · Score: 5, Insightful

    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 not repeating myself
    I'm an X window user; I'm an ex-Windows user
  10. Re:How about eradicating PDFs instead? by Jeremy+Erwin · · Score: 5, Insightful

    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.

  11. That does it. by Fuzzums · · Score: 2, Insightful

    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.

    --
    Privacy is terrorism.
    1. Re:That does it. by Microlith · · Score: 2

      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 bothering to keep pace with FF development. That is to say, they don't bother to update it while it's in Beta and people are upset their addons break on release. Whereas well maintained plugins like NoScript work great even on the bleeding edge, hell even some that haven't been updated for anything past 5 work fine if the version number is ticked upwards.

  12. Re:How about eradicating PDFs instead? by MagicM · · Score: 2

    PDFs are great for printing, but who prints anymore?

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

  13. Re:How about eradicating PDFs instead? by melikamp · · Score: 3, Insightful

    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, 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 .

  14. Re:How about eradicating PDFs instead? by ortholattice · · Score: 3, Insightful

    Scientific papers are done primarily in LaTeX. I'm guessing you don't actually write science papers, eh?

    Yes, in they usually are done in LaTeX in math and physics. However, the resulting PDF (or less frequently, PostScript) is what is distributed and viewed. I have published many papers myself and have never had a reprint request for the original LaTeX, only for the PDF.

    The LaTeX goes to the publisher (usually written to the journal's standards using highly customized formatting packages), who redistributes it in a printed journal and usually on-line in PDF form (unfortunately for a price). Some journals force you to use a two-column format, which I agree with another poster is awful to read on-screen; I have no control over that. When the publisher allows, I put a preprint in PDF format on arxiv.org where you can get it for free.

    A problem with a flowing text document format is that the page numbers are variable, making references to specific pages and paragraphs impossible. I also tend to have a "page memory" where I can recall roughly what the page looked like and where on the page an item I want to find is positioned. I think a lot of people have had the experience of not remembering exactly in a book something was, but they remembered where it was on the page it and can quickly find it by thumbing through pages. I am not as good at remembering where something was in a flowing document and have to resort to a search, which is doesn't work too well for equations and symbols.

    I have a large collection of scientific paper PDFs that I constantly reference. One thing I do (when the publisher doesn't lock the PDF) is trim off the margins so that fill-width view automatically fits the full text on screen without having to zoom by trial-and-error and futz with the horizontal scroll bars. Actually even when the publisher locks it, if it is a paper I reference frequently I'll print it to a PDF, then trim the annoying margins and re-OCR it.

  15. Re:Welcome to 20010... by Yvan256 · · Score: 2

    So, did the human race ever colonize other planets? How about the lottery numbers for december 2011?