Stop Safari from opening PDFs inside the browser

The Apple Safari logo
The Apple Safari logo

It’s been a while since I posted, but today, I had to figure-out how to make the OS X version of Safari stop opening PDF files inside the browser since that’s one of my pet peeves.

For some reason, I am one of the few people who do not like to do everything inside a browser. One of the things that most computers do, Windows and Mac, is open PDF files inside the browser.

Mac OS X has a built-in tool called Preview that is lightning fast. Compared to Acrobat, Preview is a Ferrari while Acrobat is a Yugo. Thus, I prefer to open my PDF files in Preview and not inside a bloated web browser. I also like to save them, as I often will save a PDF and look at it later.

Until recently, I have been using FireFox on my Mac. But, due to some crashing, slowness in the Gmail RSS reader, etc. I have been trying to use Safari 99% of the time. So, while I had an add-on in FireFox to force downloads of PDF files, I couldn’t seen an obvious way to do this in Safari.

After a bit of digging around, I found this little gem. As of this writing, I’m using Safari 4.0.4 on Snow Leopard 10.6.2, but the tip has worked for years, so it should work with most other combinations.

Here’s how you stop Safari from opening PDF files inside the browser and instead save them to the disk:

  1. Quit Safari
  2. Open a Terminal (in Applications -> Utilities)
  3. Paste this into the Terminal defaults write WebKitOmitPDFSupport -bool YES
  4. Restart Safari

It’s that easy! Now, when you click a pdf link, the file will be downloaded to your normal download location on the disk and you can open it with whatever tool you want.

NOTE: This will NOT work with the Windows version. There probably is some similar tweak you can do, but the above tip uses OS X specific commands!

One thought on “Stop Safari from opening PDFs inside the browser”

  1. Unfortunately, this does not work in Mac OS 10.6.4.

    Does anyone know another way of doing this? The Safari PDF plug-in is well and truly f***ed, and I just get crash after crash after crash.

    A true fix to this massive Apple bug would be very much appreciated.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.