26

So I was really excited about the new integrated pdf viewer in chrome. However when I click on a pdf file link, chrome offers to download it instead of opening it inside its viewer.

How do i get it to open pdfs inside its viewer?

Edit: I have found that it behaves kinda randomly. Sometimes it does open it inside its viewer and sometimes it asks to download it.

In gmail though it always asks to download it.

Note: I already have the 'ask where to save each file before downloading' option unchecked.

3

6 Answers 6

15

I think that the problem sometimes occurs when the web server you are downloading the PDF from does not serve the PDF with the correct MIME type.

When the web server serves a PDF with the correct MIME type, Chrome previews it. When the web server serves a PDF with the incorrect or generic MIME type (application/octet-stream), Chrome downloads it.

If the server returns a Content-Type of text/html Chrome will display/open the PDF directly in the browser. However, if the server returns a Content-Type of application/pdf then the browser will prompt the user to save/download the PDF.

2
  • 1
    Yep, content-disposition inline ain't enough, it also needs mime application/pdf.
    – Quandary
    Feb 25, 2014 at 9:10
  • Thank you for your answer, now I know why some PDF's are opened inside Chrome and others are not.
    – WG-
    Aug 5, 2015 at 6:53
8

Download a PDF file, then when it is done, left click on the download icon at the bottom and select "always open this type of file" Now It should open any PDF link you click in that window without downloading it to a permanent location.

To undo it go into Options>Under the Hood tab>Clear Auto Opening Settings.

I also have the box ticked, "ask where to save each file before download", not sure if this has any affect on the behavior of automatically opening a file.

There may be some PDFs that chrome cannot display properly, so it offers you to download it to view with another PDF viewer. It is not a full featured viewer like Foxit or Adobe

I use it this way and can find no PDF that chrome has saved, it has to cache it somewhere to read it, but I am not sure where it does.

Some more info on chrome hidden features http://www.blogsdna.com/828/seven-hidden-configuration-pages-of-google-chrome-browser.htm

Hidden experimental features for version 8

about:flags

.

8
  • I downloaded a pdf file, but 'the always open this type of file' option is disabled for it.
    – pdeva
    Dec 8, 2010 at 23:50
  • type "About:plugins" without the quotes into the url bar, hit enter, see if the Chrome pdf viewer is disabled, if it is, enable it, you may have to restart the browser.
    – Moab
    Dec 8, 2010 at 23:55
  • it is enabled. as i said, it does open pdf files randomly.
    – pdeva
    Dec 9, 2010 at 1:31
  • 9
    This solution is incorrect. It causes files to still download, but then open immediately upon completion of the download. It does nothing to get Chrome's PDF viewer working. May 13, 2012 at 16:41
  • 1
    Of course. That may excuse its incorrectness but it doesn't change it. May 15, 2012 at 19:56
5

The behavior of Chrome (and other browsers) depends on the "content-disposition" HTTP header. If it is set to "inline", it will auto-open if configured accordingly. If it is set to "attachment", Chrome will offer to save it, regardless of other configurations. In other words, behavior will vary from site to site, just like you're describing. I don't know, however, if and how it could be made to open the PDF in any case; I'm afraid this might not be possible.

1
  • Do you believe we could make an extension that changes the content type hence forcing Chrome to open the file instead downloading? Oct 23, 2014 at 9:03
2

The ability to auto-open PDFs was disabled in recent versions of Chrome. The developers re-implemented the feature and it is available again in Chrome 10 and above.

See this bug report for details.

1

Open Chrome and type "chrome://plugins" without the quotes in the omnibox/url/search bar. Click Enable under the Chrome PDF Viewer. If you need to, restart chrome for it to take effect. Should be good to go.

-2

No need to download anything. It's a quick fix. 1. Open Chrome browser 2.type in the following where you would normally type in a web address
chrome://plugins 3. enable chrome pdf viewer by clicking on Enable

Yes that simple......

1
  • 1
    This duplicates another answer and adds no new content. Please don't post an answer unless you actually have something new to contribute.
    – DavidPostill
    Apr 20, 2016 at 20:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .