How do I get PDF files to open inside my browser? Or not?

Configuring where PDF documents on the web should be displayed - within your browser or not - turns out to be somewhat tricky. I'll look at the options.

//

There are forums full of questions relating to “my pc will not open pdf’s in browsers although I have Adobe Reader v9 as suggested in the resulting error message”. I have this issue as well.

There are forums full of almost any question you can think of, easily answered or not. Smile

This one falls into the “surprisingly complex to answer” category.

Personally I hate having PDFs open within the browser. I find that the PDF reading application, like Foxit, Acrobat or others, generally provide me much more control over how the document is presented in turn making it much easier for me to read.

It’s one of the first things I change when I configure a browser.

But, of course, not everyone feels the way I do.

The Two Options

For those who aren’t familiar, I should probably review what I’m talking about.

PDF, or Portable Document Format, files are just that – individual files that contain a document designed to be easily viewed just about anywhere.

They require that you have a PDF reader of some sort installed. Most common is Adobe Acrobat Reader, though there are others such as Foxit Reader.

The “normal” approach to reading a PDF file that’s presented to you on a web page is to click on the link to the PDF, download it to your machine and then run the PDF reading application as a separate Window to open and read the document:
Adobe Reader opened on a document outside of Internet Explorer
Here you can see Internet Explorer opened to the Internet Safety eBook download page, and Adobe Acrobat Reader with the document open in the foreground. When you click on the link to the PDF on the web page, the document is downloaded, either to a location of your choosing or the internet temporary files location, and then opened outside of the browser in the separate PDF reading application. (The way I like it.)

The alternative is this:
Adobe Reader opened on a document inside of Internet Explorer
In this case, the adobe reader operates as an add-on within Internet Explorer, and displays the document within IE – almost treating it as if it were another web page, which of course it isn’t really. When you click on the link to the PDF the document is downloaded, this time almost certainly to the internet temporary files location, and the Adobe Reader addon opens the file displaying it within Internet Explorer.

You can tell this is a PDF document opened in an addin because of the additional PDF navigation controls at the top of the display window:
PDF controls within the browser window
This is, apparently, the way others apparently like it. Smile

The problem is that depending on which browser you use and which PDF reader you choose the setting you need to change may be in either, or both. You may also need to select additional options when installing the PDF reader to make sure that the options are even available.

Setting the Default with Adobe

When you use Adobe Reader, the option on where to display is a setting within Adobe, not within the browser.

Fire up Adobe Reader – you should find it in your Start menu. Once it’s open, click on Adobe’s Edit menu, and then the Preferences… menu item. On the left of the resulting Preferences… dialog box is a long list of categories; click on Internet
Adobe options to display the PDF in the Browser
Check, or uncheck, the Display PDF in Browser as you wish. (If it doesn’t take effect immediately, you may need to close and restart the browser.)

FireFox

When using FireFox it’s easiest to control what happens in Firefox itself.

Click on FireFox’s Tools menu, Options menu item, and then in the resulting Options dialog, the Applications tab. Near the top, if you have Adobe Acrobat installed, you’ll see “Adobe Acrobat document”. Click on the drop down menu to its left:
Adobe Acrobat PDF setting in FireFox
Click on “Use Adobe Reader” if you want PDFs to be displayed outside of the browser, or “Use Adobe Acrobat (in Firefox)” if you want PDFs to be displayed within the browser.

FoxIt Reader

If instead of Adobe Acrobat you happen to use Foxit Reader, your options are similar. If you use Internet Explorer then run Foxit Reader, click on Tools and then Preferences and then click on the Internet category on the left:
Foxit Display Options
Check, or not, “Display PDF in Browser” as you wish.

If you’re using Firefox and Foxit, we return to Firefox’s options exactly as before, except this time we look for “PDF Document” (or, in some cases “application/pdf”) and choose the setting for that:
PDF setting in FireFox after Foxit installed

Other Readers, Other “Gotcha’s”

As you can see, the setting may be in the browser itself, or in the PDF reader. With that, if things aren’t working as you expect, make sure to check both, if both are available.

If things aren’t working as expected, also make sure that the PDF Reader you choose is set to be the default reader. Some will check on startup and tell you, others will have an option, others will actually require that you uninstall all other readers and perhaps reinstall the one you want as the default.

And finally, the ability to display within your browser may be an additional option you need to select when you install your PDF reader.

Bottom line: it’s a bit of black magic to get things configured the way you want, particularly if you have several browsers and readers installed. But with the various places to look I’ve covered you should be able to get things set to your preferences.

There are 14 comments:

  1. Rege Reply

    Another option is to use Nitro’s PDF Download extention for FF. When you click on a PDF link, a window opens which allows you to select how you want to view the PDF.

  2. Rick van Vliet Reply

    Does anyone know of any way for web publishers to help make that decision when a PDF is posted in a web page? Or is it strictly the visitor’s settings that control this? I usually publish a PDF, with a target=”blank”, so a new browser window opens with the PDF, but it’s still usually the browser that opens for the visitor.

    No. This is a user-level option, not something that a web site author can control.

    Leo
    04-Oct-2010

  3. Mark Jacobs Reply

    @ Rick I solve that problem by zipping my pdf files before posting them. (I assume my visitors prefoer to download than to open them.) It’s also good for other files especially exe’s and even xlx, doc and pdf when people’s browsers insist on opening them in Word.

  4. Philip Reply

    I changed mine by opening properties on one PDF file and changing the preferences from opening with internet explorer to Adobe reader. It changed them all.

  5. Sandy Smith Reply

    I actually like it to open in the browser. It saves me “clicks” and opening another program as most times it’s just my statement for a credit card and I am only viewing 1 or 2 pages… But to each his own — we should all be glad this is one time we have “choice” as to user preference, when too many times we don’t.

  6. Terry Hollett Reply

    In Opera: Tools>Preferences>Advanced>Downloads – then type in pdf in Quick Search. Click on application/pdf then click on Edit. Check Save to disc

  7. Ron Reply

    Leo

    Your suggestion above does not work for me. I need the web address of the pdf to post a link to it. I am using adobe 9 and Internet Explorer 64bit. No matter what I do I cannot open pdf documents in the browser so that I can copy the address. I have not had the same problem with Internet Explorer 32bit!

    Regards

  8. Big Geek Daddy Reply

    You just solved an annoying PDF problem for me with this article. Changed my setting in Firefox to “Save File” and now PDF’s download with Foxit Reader instead of trying to open in a new tab.

  9. Peter Mackin Reply

    @Ron,

    Another way to get what you want is to right click on the PDF’s link on the web page. Select “properties” and then in the window that opens you can copy the URL of the PDF from there. You should be able to use that URL as the link you want in your post.

    Regards,

    Peter

  10. Bev Stevens Reply

    Excellent! Although, as in my case, instead of “Internet” under the “Preferences” for Foxit Reader, the option to “Display a PDF in browser” was found under “File Associations”. Thank you, so much – I have been pulling my hair out!

  11. steven Reply

    I’ve installed firefox. I’ve enabled and disabled and plugged-in and added-on and crap!!! I’ve uninstalled and installed reader, flash 1 million and 1, yelled and kicked the god-damn- @@@!!? …And the only way to open pdf in reader is to unistall word! Works lovely now but I need a word processor?? Any thoughts

  12. WebLady Reply

    Awesome solution! Works perfect. Now I use Firefox and Foxit as my default PDF reader. I no longer get those errors when I used Adobe’s reader. When I click on the pdf links, they come up nice and smooth. No more errors! Thank you so much for your website and this posting. It really helped.Thanks Leo!

  13. Reid Reply

    This got me started but my problem was resolved by locating “Portable Document Format” and changing the drop-down under “action” on the right side to “Use Adobe Reader (default).” This solved the problem completely.

Leave a reply:

Before commenting please:

  • Read the article. Seriously. You'd be shocked at how many people make comments that prove they didn't.
  • Comment only on the article. If you have a new, unrelated question start with the search box at the top of the page.
  • Don't post personal information. Email addresses, phone numbers and such will be removed.

VERY IMPORTANT: because of a rise an comment spam that's making it through our filters any comments that do not add to the discussion - typically off topic or content-free comments - run a very high risk of being flagged as spam and removed.

If you have a new question unrelated to the article above, ask it on the Ask Leo! ask-a-question page.