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!"
Good (Score:4, Insightful)
Re:Good (Score:5, 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.
Re:Good (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.
Re: (Score:2)
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
Re: (Score:3)
Re: (Score:3)
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)
Re:Good (Score:4, Insightful)
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.
Re: (Score:2)
Re: (Score:2)
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?
Re: (Score:2)
Users' choice. A link to an image opens a new document - and that document (html, pdf, jpg, etc) can end up in a new tab, new window or a different app - whatever the user prefers.
I'm not arguing against having a PDF viewer built into the browser - but I've
Re: (Score:2)
What's wrong with a bit of user choice? The image thing is a good example. If you're looking around for a particular image, you don't want to download each one before trying it, you want your browser to download it first and display it quickly. PDF's aren't much different.
I regularly have to google around for specific information that's nearly always found in PDFs and currently it's more of a chore than it needs to be. Adobe reader's browser plugin is horrendous and crashes more often than not. To make matt
Re: (Score:3)
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
Re: (Score:2)
The whole point of implementing in JS is to not increase attack surface: everything pdf.js does can already be done by web pages.
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
Saving it for reference later is always good. But very often there are links you get while browsing the web and you want to read them then and there, not save them first and wait for reader to load, etc.
The other problem is that too many "readers" have bloated features not needed. I don't care if a doc is signed, or the ability to add my own notes to it, or all those security holes that should not exist in a small simple read-only reader. PDF has gotten extremely complicated over the years and each new A
There are real problems to solve first, Mozilla! (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".
Re:There are real problems to solve first, Mozilla (Score:5, Informative)
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
Re: (Score:2)
I didn't even notice it was gone, but I'm pleased to have it back. Thanks!
Re: (Score:2)
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.
Re: (Score:2)
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.
Re: (Score:2)
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.
how about reversing the process? (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
Re:Good (Score:5, Funny)
In Mozilla Firefox, Javascript interprets PDF!
Re: (Score:3, 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...
Please God no! (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!
Re: (Score:2)
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.
Viewing a partially downloaded PDF (Score:2)
Uh, you have to download the PDF in to view it in your browser too.
Some PDF viewers can begin displaying the first page while the rest of the pages are still downloading.
Re: (Score:2)
...which works perfectly for a running computer program - it is an instance of the program that resides on the disk. More than one PDF - more than one instance running.
Re:Please God no! (Score:4, 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.
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
Then don't use it. Whew, problem solved.
(Valid) Criticism is useful. Personal preferences are irrelevant.
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
Wait, still do, just via telnet [roughneckbbs.com].
Re: (Score:2)
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.
Re: (Score:2)
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.
Re: (Score:2)
Re: (Score:2)
Re: (Score:3)
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!
Re: (Score:2)
Re: (Score:2)
Will they ... (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 ...
Re: (Score:2)
It's Firefox, not Chrome. You'll be able to disable it if you want to.
I like the idea... (Score:4, Insightful)
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
Re: (Score:2)
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.
Re:I like the idea... (Score:4, Insightful)
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:2)
Re:I like the idea... (Score:4, 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.
Re: (Score:2)
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
Re: (Score:2)
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
Re: (Score:2)
The program should write out its preferences. The pdf file you're reading should not do this.
Re: (Score:2)
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)?
Re: (Score:2)
Is a PDF reader written in Javascript going to be as fast as a PDF reader written in a standard compiled language?
No.
Re: (Score:2)
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.
I tried this days ago. (Score:2)
It does work, but it's still alpha quality at best.
Page layout is messed up.
How about eradicating PDFs instead? (Score:2)
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.
Re:How about eradicating PDFs instead? (Score:5, 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?
Re:How about eradicating PDFs instead? (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.
Re:How about eradicating PDFs instead? (Score:4, 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 [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 .
Re: (Score:2)
Re: (Score:2)
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.
Re:How about eradicating PDFs instead? (Score:4, Insightful)
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.
Re: (Score:3)
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.
Re: (Score:2)
Re: (Score:2)
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
Re: (Score:2)
You know you can save HTML pages too, right? Browsers nowadays are pretty good at saving the page requisites too, like images and CSS files.
Re: (Score:2)
Re: (Score:2)
I was actually referring to the first paragraph of parent's post about saving a local copy for later use. I have no idea how the paged media support is nowadays.
Re: (Score:2)
The right tool for the right job. HTML isn't intended for the purpose. PDF was designed for the explicit purpose of taking it to pretty much any computer and opening up, while preserving the formatting, fonts and content that is in the PDF.
HTML is getting better, but it's really not an acceptable solution when you're requiring a number of files per page. Sure, you could zip them all up, but at the end of the day it's the wrong tool for the job.
As far as PDFs go, there's nothing wrong with them that removing
Re: (Score:2)
why not ditch pdf? (Score:2)
Re: (Score:2)
http://dowebsitesneedtolookexactlythesameineverybrowser.com/ [dowebsites...rowser.com]
Re: (Score:2)
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.
Page number references (Score:2)
Re: (Score:2)
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.
...once printed (Score:2)
Page or slide defined (Score:2)
A "page" or "slide" is a division of a document that is the same size as a viewport. Progression through a document made of pages is done by showing the next or previous page in the entire viewport. The analogy is to a codex, which has two pages on each sheet of paper, or a set of film slides loaded into a projector, which presents one page on the screen.
Layout for paged media uses different techniques from layout for an unbounded vertical scrolling document. Pages are typically given sequential numbers
goodbye acrobat reader and good riddance (Score:2)
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!
Re: (Score:2)
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.
Depends on what "features" Firefox enables (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.
Re: (Score:2)
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.
Re: (Score:2)
On April 14, this year, Wisconsin efile tax site required a specific version or higher of Adobe Reader; no lesser versions, no alternatives.
Re: (Score:2)
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)
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.
Re: (Score:3)
I know, it's so terrible getting regular security updates.
Funny, after I installed FF4 I reset the UI to FF3.5 style. Now I'm on Nightly 10 and it looks the same.
Fortunately it's javascript, so it won't impact the browser itself at all.
Enjoy your Adobe-introduced security holes.
The single biggest problem is addon developers not bo
Congratulations to Firefox... (Score:2)
...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."
Re: (Score:2)
I'm sorry but if you are fighting with the PDF plugin you're doing it wrong. Every plugin I've used to read PDFs seems to work pretty seamlessly from Acrobat to Foxit. They just work, no fighting involved.
But that's usually proprietary software using a non-Slashdot approved license! Think of the children!
Seriously - you're right. Why reinvent the wheel? Just hook into what the OS provides - the Mac has handled PDFs next to forever, and I'm pretty sure Windows 7 does as well. And Linux... well no one uses a GUI there anyway, right?
Re: (Score:2)
(...) I'm pretty sure Windows 7 does as well
Nope. Windows only has APIs for their own pet document format (XPS [wikipedia.org]).
Re: (Score:2)
For mousy users embedded readers are fine. For keyboard users it's hell, since plugins grab the focus away from the browser.
Re: (Score:2)
This is slashdot. Sympathy will be hard to find for this problem.
Re: (Score:2)
You can easily do that today with any of the free "Print to PDF" applications (in Windows; in OS X, it is built-in, and I'm pretty sure this is the case for Linux as well).
Re: (Score:2)
IE - as in, the browser - is really just an ActiveX host container that displays the appropriate component depending on the type of file downloaded from any given URL. If it's HTML, it'll use the HTML rendering engine. If it's PDF, it'll use whatever application is registered as the ActiveX handler of PDF documents. Adobe does it for their stuff, but third-party PDF viewers could do the same - and I would be surprised if some of them don't do just that.
As for this Firefox thingy, they claim that it's writte
Re: (Score:3)
So, did the human race ever colonize other planets? How about the lottery numbers for december 2011?