How to open pdf in Chrome's integrated viewer without downloading it

24

6

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.

pdeva

Posted 2010-12-08T20:43:24.763

Reputation: 1 701

Do the reverse of this - http://superuser.com/questions/107700/how-to-disable-automatic-opening-of-pdf-files-in-chrome

– ChrisF – 2010-12-08T20:47:49.297

possible duplicate of Make Chrome always open PDFs itself

– ks1322 – 2013-08-24T13:16:19.480

Answers

13

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.

starbeamrainbowlabs

Posted 2010-12-08T20:43:24.763

Reputation: 849

Thank you for your answer, now I know why some PDF's are opened inside Chrome and others are not. – WG- – 2015-08-05T06:53:07.813

1Yep, content-disposition inline ain't enough, it also needs mime application/pdf. – Quandary – 2014-02-25T09:10:05.787

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

.

Moab

Posted 2010-12-08T20:43:24.763

Reputation: 54 203

@Moab The Pdf viewer is enabled in my chrome but he's downloading file always instead of opnenig it in new tab. – Chlebta – 2014-10-29T13:56:01.763

I downloaded a pdf file, but 'the always open this type of file' option is disabled for it. – pdeva – 2010-12-08T23:50:04.223

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 – 2010-12-08T23:55:18.957

it is enabled. as i said, it does open pdf files randomly. – pdeva – 2010-12-09T01:31:51.507

As I said "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" – Moab – 2010-12-09T16:34:55.773

8This 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. – Noah Yetter – 2012-05-13T16:41:55.850

@NoahYetter you realize how many times chrome has been updated and changed since this answer was given? – Moab – 2012-05-13T16:51:43.943

1Of course. That may excuse its incorrectness but it doesn't change it. – Noah Yetter – 2012-05-15T19:56:22.353

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.

Abagneele

Posted 2010-12-08T20:43:24.763

Reputation: 151

Do you believe we could make an extension that changes the content type hence forcing Chrome to open the file instead downloading? – Shimmy – 2014-10-23T09:03:06.913

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.

Joel

Posted 2010-12-08T20:43:24.763

Reputation: 31

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.

wastintime99

Posted 2010-12-08T20:43:24.763

Reputation: 11

-1

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

Babymaker1974

Posted 2010-12-08T20:43:24.763

Reputation: 1

1This duplicates another answer and adds no new content. Please don't post an answer unless you actually have something new to contribute. – DavidPostill – 2016-04-20T20:20:57.497