Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a way to make Google Chrome always open PDFs with its internal viewer when I click a link, as opposed to downloading it to the default location. It works with most URLs, but some servers set a special header to force the file to be downloaded ("Content-Disposition: attachment;", e.g.

What I want is the opposite of this question: Stop PDFs from displaying inside Google Chrome, or what is asked for here, but applied to Chrome: How to ignore “Content-Disposition: attachment” in Firefox

Btw., I'm running Chrome 8.0.552.0 dev on Ubuntu 10.4.

share|improve this question
Would it be acceptable if the PDF is opened in Google Docs ? – Sathya Oct 14 '10 at 13:54

You can remove Content-Disposition response header using Redirector extension. Just add a rule removing Content-Disposition header. Here how it looks like in Rule Editor: redirector rule

With this rule applied all PDFs will be opened in internal viewer.

share|improve this answer
Choosing "Wildcard" and "Response Header" from those dropdown menus that look like buttons is important - I missed that at first. – Brilliand Nov 8 '12 at 2:12
Chrome extension no longer available. See for an alternative. – Oliver Joseph Ash Jun 13 '14 at 13:44

The "Redirector" answer was just what I was looking for, but that extension is no longer available. So I kept digging and found Modify Content-Type. It's working as I expected (PDFs open in the internal viewer despite Content-Disposition: attachment in the response headers) with a rule of:

URL Filter:       .*
Original Type:    application/.*pdf
Replacement Type: application/pdf
Disposition:      inline

Note well that this may expose you to cross-site scripting vulnerabilities, and you would be wise not to allow .* in the URL filter. Add to it only as needed.

share|improve this answer
I have a rule as follows that seems to work, and should be restricted to PDFs (I don't know about XSS vulnerabilities though, and anything could have a .pdf extension, so still be aware): URL Filter: https?://.*\.pdf Original Type .* Replacement Type: application/pdf Disposition: inline – Scott S Nov 29 '14 at 6:01

On the URL bar, type chrome://plugins/, look for the Adobe plugin and click on Disable.

Restart Chrome and load a PDF and the file will load using the Google PDF plugin.

share|improve this answer
Exactly what I had to do to get it working on OS X – Nick Oct 14 '10 at 15:28
Comment by @Kyla: This didn't work for me :( it's just this one website that forces me to download them instead of just viewing them online. – Ivo Flipse Dec 30 '10 at 17:26
which version of chorme are you using? it works for me perfect... – Cesar A. Rivas Dec 30 '10 at 20:34
This seems to solve a different problem. See the second question jdm linked to:… – daxlerod Apr 24 '12 at 19:52
I'm having the same problem; the Chrome PDF plugin is already enabled on my machine. I'm trying to force pages that specify the PDF should be downloaded (for example with a meta refresh or a MIME entry) to open the PDF in a Chrome tab instead, since all I'm going to do is find the PDF on my hard drive and open it there, then have to go find it again later and delete it. I believe the OP was trying to accomplish the same. – Chris Moschini Jul 1 '12 at 19:07

Try the --no-sandbox option.

This should be your shortcut:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --app="" --no-sandbox
share|improve this answer
How would it work? --no-sandbox should disable sandbox, not ignore HTTP headers, right? – gronostaj Jul 22 '13 at 8:43

You must log in to answer this question.

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