Bringing improved PDF support to Google Chrome

Thursday, June 17, 2010

Millions of web users rely on PDF files every day to consume a wide variety of text and media content. To enable this, a number of plug-ins exist today which allow users to open PDF files inside their browsers.

As we’ve previously mentioned, the traditional browser plug-in model, though powerful, presents challenges in compatibility, performance, and security. To overcome this, we’ve been working with the web community to help define a next generation browser plug-in API.

We have begun using this API to improve the experience of viewing and interacting with PDF files in Google Chrome. This mirrors our efforts to optimize the Adobe Flash Player experience in Chrome.

Today, we are making available an integrated PDF viewing experience in the Chrome developer channel for Windows and Mac, which can be enabled by visiting chrome://plugins. Linux support is on the way, and we will be enabling the integration by default in the developer channel in the coming weeks.

With this effort, we will accomplish the following:

  • PDF files will render as seamlessly as HTML web pages, and basic interactions will be no different than the same interactions with web pages (for example, zooming and searching will work as users expect). PDF rendering quality is still a work in progress, and we will improve it substantially before releasing it to the beta and stable channels.
  • To further protect users, PDF functionality will be contained within the security “sandbox” Chrome uses for web page rendering.
  • Users will automatically receive the latest version of Chrome’s PDF support; they won’t have to worry about manually updating any plug-ins or programs.
Currently, we do not support 100% of the advanced PDF features found in Adobe Reader, such as certain types of embedded media. However, for those users who rely on advanced features, we plan to give them the ability to launch Adobe Reader separately.

We would also like to work with the Adobe Reader team to bring the full PDF feature set to Chrome using the same next generation browser plug-in API.

We’re excited about the usability and security improvements this will bring to Chrome users, and we’ll continue to keep everyone updated on our efforts through this blog.

58 comments:

Max said...

This does sound fantastic, but I do worry about the faithfulness of the typesetting. When I look at a PDF I need the formulas and symbols to be there (and in the right spots) and every attempt I've seen at other pdf readers has fallen short. This time it'll be good?

ah.ejazz said...

that is a gr8 news..finally we can view pdf in browsers with ease...earlier it had been nightmarish experience..i preferred to download them using external download managers instead of clicking a link ending in .pdf :)

guenther said...

Which render engine does Chromium user? Xpdf/Poppler?

Luke Hutchison said...

Nice but I don't see the code anywhere in Chromium trunk -- http://www.google.com/codesearch?hl=en&lr=&q=package:%22src.chromium.org/svn/trunk%22+pdf&sbtn=Search -- where is the code posted please?

extromium said...

Linux build is also supported.

I have read several pdfs with libpdf.so happily before seeing this blog announce.

I use a latest chromium build with libpdf.so come with google-chrome-unstable_6.0.437.1-r49781_i386.deb.

You have to enable it in about:plugins page.

Gerard said...

you have to go in an enable it in the plugins area.

you might as well disable the Adobe PDF plugin while you are there.

Works VERY VERY FAST !!!

Adios Adobe Reader

Gerard said...

Founda Bug.

Open PDF
Zoom it x 4
Search for a common term
Now you will notice that it will not scroll correctly as you iterate through your search hits

Rob said...

@Gerard: It's probably going in the order of content seen, as though going through html div's.

Good first pass.

Definite Need:
- Anchor links, and web links. Critical for long book-ish pdf's.
- A way to jump to a page number.

Nicety:
- Left + Right, for scrolling pages.

Here's a pdf, that uses a lot of features:

http://changethis.com/files/CT-manifesto.pdf

cevarief said...

I hope this will also feature pdf printing. As we know, there's no print preview in chrome currently. So with this feature it would be nice to preview report in pdf format as well as print it easily.

Moshe said...

Very nice!

Now you can work on Atom/RSS content formating, which present in every other browser :)

ach said...

Are the 'Advanced Features' the same as PDF preview in Gmail. These lose basic functions in PDF, mailto links do not work in the preview mode for instance. Where can we see what is in and what is out?

Paweł Szmajda said...

Is there any chance to bring Google Dictionary extention to pdf files? Right now, looking up word meaning in pdfs is ridiculous, I have to select word, right click, go to dictionary.com website, wait for the site to load and then manually switch back to chrome! It would be awesome if we could just double-click in pdfs!

jean-michel said...

i use google chrome with my linux
what is the plus to use chromium

Mr.Wizard said...

This is great, but why didn't it get into the release notes?

knapek.mar@seznam.cz said...

What about PostScript files, will be ps supported too?

Ricardo Z. Vendramini said...

Very smart and well done, Google!

Owen Campbell-Moore said...

It doesn't spot some PDF files which leads to being promped for a download such as this: http://hsgac.senate.gov/public/index.cfm?FuseAction=Files.View&FileStore_id=4ee63497-ca5b-4a4b-9bba-04b7f4cb0123

mark said...

Please make sure that the PDF viewer is encrypted. The current plugin makes a secure PDF in https login go unencrypted.

Noumena said...

A very good first pass! No rendering problems with complicated mathematical diagrams produced using LaTeX, for example.

One issue I've noticed thus far: there doesn't seem to be a way to save or download embedded/inline PDFs, nor open a frame containing just a PDF. WileyInterscience, for example, embeds PDFs of academic journal articles in a frame, and uses a banner frame across the top of the browser with some navigational links and citation data. Chrome interprets File->Save as a request to save the whole page, not just the PDF in the lower frame. Since the lower frame is all PDF, I can't right-click/command-click down there to save just the PDF or open the frame in its own tab or window.

divilex said...

WE JUST NEED GOOD PRINTING WITH THIS!!

Great Job!

Nikanorov said...

"Docs PDF/PowerPoint Viewer (by Google)" extension works better for me. =(

Atheos said...

Hint for Mac version: use the Quartz PDF support built in OS X. Or add an option/plugin for that. I prefer the OS X PDF rendering over Chrome's, sorry. Great for Windows/Linux users, though.

ecir said...

Please! Share more info with us!
What library are you using, what PDF version are you targeting, do I need Acrobat or is this completely separate effort, where can we read the sources, ...?
A-M-A-Z-I-N-G!

Mary said...

There is no way that this is adobe...must be the faster alternative... Foxit
which one is this?

Ivan said...

Very good news! My suggestions - for inspiration see fast and usable hotkesys of gv (ghostview). For example:

2 -> zoom 2x,
Shift+2 -> zoom to 1/2
123 on numlock + enter -> goto page 123

KMP said...

+1 Thanks, guys. This is 80-90% of what's needed for everyday use. Good work!

Boraski said...

Sounds good in principle, but after trying I don't clearly see the advantage of using this vs Adobe Reader, apart from not needing to install that large piece of software.

No headings tree at the left, no links, no document properties (title, author...), prints as (limited resolution) bitmap image instead of vectors and text.

I tried to print 3 pages of a text document to PDF (with PDFCreator): 1813 KB with Chrome vs 40 KB with Adobe Reader. And the quality of the former is limited by its resolution.

Suggestions:

- When saving a bookmark to a PDF document use the document *title* (extracted from the PDF) as bookmark name instead of the URL (as you do with HTML pages that use the title element for that purpose). This should be one advantage of this close integration with respect to a plugin.

- Center the document in the window: currently displays stuck to the left border with empty space on the right.

- Allow zoom to fit page width and zoom to fit full page.

- Make links work (in-document and to external URLs)

Shawn said...

Has anyone else got this working with Linux (Ubuntu specifically) when I enabled it I get the grey missing plug-in page

tor said...

This is very cool. PDF is a very useful format, but the acrobat reader plugin is slow and unstable. I wonder though: Is the rendering engine part of the open source Chromium?

David Tweed said...

As with many things, this is mixed news. One of the reasons I still use xpdf is that it allows you to specify a colour for the "background colour" when it displays so I can convert the white that's sensible for paper to a light gray that's I find easier to read on a monitor. More xpdf-descended viewers have apparently decided The User Should Not Be Allowed To Do This and removed the functionality. That's fine for discrete applications as I can choose to use the one application that does what I want, but with a pdf viewer integrated into the browser, I've had the capability to do what I (the user) want taken away from me.

That's the problem with monolithic applications: if the programmers don't think a user's desire for something is important, the user has no way around it.

mark said...

Please also consider pushing the open standard .xps instead. PDF is a bloated, archaic, terrible standard!

Cougar Abogado said...

I love the new built-in viewer; it feels 5x faster than the "Docs PDF/PowerPoint Viewer (by Google)" extension.

However, I do have one concern. If this is going to be the default, how will I save a pdf into Google Docs? Will the Chrome PDF Viewer have this functionality built-in or will I have to do some workaround to get it?

Ikhwani said...

@Shawn: I also don't get the internal PDF plug-in to work in Ubuntu Karmic. According to the stderr output, it has something to do with issue http://code.google.com/p/chromium/issues/detail?id=38229

Arancaytar said...

> Has anyone else got this working
> with Linux (Ubuntu specifically)
> when I enabled it I get the grey
> missing plug-in page

I have exactly the same problem. The post does state Linux support is not done yet; but the plugin is clearly included in the current dev snapshot for Linux.

Hannes said...

Is it free Software? Where's the code?

Or is it yet another proprietary extension that installs against my will?

mathew said...

Oh dear. Bloat comes to Chrome.

Well, so long as I can uninstall it and use the perfectly good PDF reader I already have, I suppose it doesn't matter.

manmadegod said...

Great, thank you Google :)

However, I had a problem as I tried using ctrl+F in russian pdf files.
The viewer can only search for separate symbols, but not for symbol combinations
(for example if there is a word "собака" it will find the symbol "б", but it won't find "обак" in the document).

Eric said...

It looks great, and seems to render everything correctly, but I've noticed that when I press Ctrl + A to select all while on a PDF document using the new PDF plugin, the entire document and page (including blank space and the scroll bar, but not necessarily the text within the document) is selected in blue, and it seems extraordinarily difficult to deselect it, if it's possible at all. Just a quibble, but if that's fixed, I'd love to have this integrated right in Chrome.

Rohan said...

Am I the only one who doesn't have it in their chrome://plugins. I've tried the dev channel too.

jfp51 said...

@Rohan, i don't seem to have the option to enable it anywhere either on Chromium 6.0.448.0 (50706) in Vista x64.

Justin said...

As others have said, this lacks some key functionality:

* Save local copy
* Zoom to fill browser; Zoom to actual size
* Search
* Print
* Switch to Acrobat for any PDF.

Great start, I hope this feedback helps!

leonard said...

I'm doing some testing with a site of mine that uses PDF's extensively... it seems that the Landscape layout does not get passed to the printer. I hope that can be fixed.

pamantugel said...

seems still bad news for people who want to force chromium to download the pdf instead of reading it on the browser :(

jean said...

Hello!

Will it come to chromium someday?

itinko said...

I see Chrome pdf viewer is enabled in chrome://plugins but I still get plugin missing when trying to browse a PDF document.

Chrome 6.0.472.11 dev

Tim said...

Hay! It works on Linux (64-bit, no less) now! My only request would be to make it so that I can default the zoom to "fill page width" every time.

Great job!

JKurtock said...

There are lots of reasons to use PDFs .... But the main one is that you need a document to look a certain way. Not sorta-like. Exactly. (e.g., you plan to print it on label stock. If the address needs to start 3.2" from the top, starting at 3.4" doesn't cut it.)

Fortunately, long before you get to Acrobat's "fancy" features, it guarantees accurate page placement. But Chrome doesn't. At all. Okay, it's sorta-close, but for all but a few rare purposes it's useless.

No problem, I've got Acrobat Reader. I've got Acrobat Pro. Just display the page with .... uh,oh. I can't. Chrome demands total fealty, and will not allow it!

So, give it up. If you want to try adding a PDF "previewer," knock yourself out. Just make sure that it is turned "off" by default. Until Chrome unlocks the PDF renderer, I can't use Chrome.

GeertVc said...

Good to see that Adobe is (can be) kicked out!!! One sorrow less...
But it would be good if one could choose to connect an external PDF viewer (like the fantastic PDF-XChange viewer) to files ending with the extension .pdf.
FireFox has such system (Applications Content Type feature), but that's apparently not possible in Google Chrome?

Jeremiah Deborgstein said...

The Chrome PDF reader plugin is a badly-needed great idea because of the sandboxing. However it is not open-source and probably never will be, therefore I will not use it:

http://code.google.com/p/chromium/issues/detail?id=50852#c16

so, you're right, Luke: source is missing. Since Chromium is supposed to be generally open-source, I think there should be a disclaimer every time someone mentions this PDF plugin to avoid misleading people.

The fact that the community can inspect Chromium source is the key feature through which I can run a Google-written browser with zero worry whatsoever for my privacy. With source, I see Chromium doing just what it promises---moving the web forward---which is very, very exciting and IMHO is already paying off big. Without source, I won't use it, and I'm not sure if I can advocate it either. I'll have to think more, but for the moment I see less potential conflict-of-interest using exploit-riddled proprietary Adobe/Apple readers over the Chrome plugin. Either that, or just use Google Docs which has quite good safety and fidelity, and there it's totally transparent to users that Google will see a copy of their PDF.

I know the Chrome plugin is probably clean, but the community still needs to inspect it to make it safe because sometimes spying can creep in through slow tiny ways, even by mistake, when the intentions are still good. It's also just, at this stage in the game, a totally reasonable thing for a user to demand.

sorry, guys. It'll probably be a while before the free software PDF readers can match this one's quality and safety, but I just can't use it.

Luca said...

I can see, enable and use the PDF plugin in Chrome (7.0.517.41 beta), but in Chromium (9.0.567.0 (64354)) it is not even on the about:plugins page.

Help please...?

I run Ubuntu 9.10 64-bit.

Nikki said...

I am using 9.0.576.0 dev. it does open a pdf file with no trouble. However I have not figured out how to save the view. If you go to save as, it is saved as either html or PL. seems to depend on where you click. If you right click on the page it saves as a PL file which can be opened in Chrome. If you try to print the original page as a pdf it just gives you the header and footer and an otherwise blank page. If you go to the saved PL file and clik on it and tell it to open in Chrome then, if you print to a pdf file it works. Seems an awful lot of steps. Keep working on it Google!!!!

Ms. said...

Will the inline PDF improvements for Chrome carry over to Google Doc Preview?

Right now (12/2010) the native PDF preview in Doc fails for PDF files (v8.2) that contain forms. I only would like to preview, not edit the form content.

Today Doc preview of these PDFs presents the message you get from Adobe when your reader is out of date, instead of the true document content. Here is an example:

https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B0lQHdyTl8v-ODFlN2ZhOGYtM2JiNi00MjU0LWE4YzctYjljYWE1YzYyOWQ4&hl=en&authkey=CLuw8ZYK

Matthew said...

PDF rendering has never worked well for me. I love Chrome but often have to use Mozilla for PDF viewing.

Vincent said...

It looks ok but it cannot rotate the PDF document! Pls give us back the old way of opening PDF in Chrome while this feature is being worked on!

Ken said...

Recent changes to Chrome's PDF rendering have made it impossible for me to use Chrome to access my brokerage statements and made it impossible to save my banking statements. The ability to save the pdf locally is extremely well hidden if it actually exists. The entire frame set which include a frame with a pdf of my brokerage statement gets shrunk to a tiny thumbnail size once the pdf is retrieved by Chrome. Very frustrating to have to switch browsers to do something so common.

Pomax said...

Great! Except your viewer lacks every single feature that I need when viewing PDF, so how the hell do I turn it off.

I addition: you're making millions of people break the law by allowing Chrome to violate PDF spec. You programmed it to ignore the license flags that come with PDF documents.

When a PDF indicates it may not be modified, that also means you're not allowed to create a derivative work in another format.

So how do I turn this feature off? Better yet, can YOU please turn it off right now and offer people this option when viewing a PDF instead.

A bit more thinking = usually a good idea.

Fantius said...

I love the lightweight approach. Any chance you could add the ability to rotate the PDF?

Ann.Jewell said...

I love Chrome but I use it for QBO and the PDF is useless if I can't easily print or save it. Please fix this soon...