Friday, October 25, 2013 [Tweets] [Favorites]

PDF Downloads Broken in Safari on Mavericks

I’ve long used the WebKitOmitPDFSupport default so that Safari would download PDF files rather than display them in the browser window. In Mavericks, there’s a bug where this causes Safari to display the raw data of the PDF file. You can prevent this by entering these commands in Terminal go back to the default behavior:

defaults write com.apple.safari WebKitOmitPDFSupport -bool NO
killall -SIGTERM cfprefsd

I found that the killall was necessary, even if Safari was not running, in order to make the change stick. Logging out might also work.

When Safari is displaying a PDF file, there are two main ways to save it to disk:

I’m not aware of any built-in way to auto-download PDF files without either of these extra steps. If there’s a link to the PDF file, you can Option-click it, but often there is no visible link.

7 Comments

yes, this doesn't solve the problem. the old functionality for pdf was that it would just download it upon regular click if the internal viewer was turned off. that is the functionality i need, if it doesn't return soon, i'll have to migrate to chrome or ff, which i've not needed for years...

If you have the URL in your address bar, type Option-Return to download the file. Works with any file, not just PDFs.

Thanks to Mike for pointing towards the Option key. It seems in Mavericks the Keyboard is your Friend more than before.
I tried it with clicking on a bookmark while holding the Option key and it did the Trick.
Cheers

@Mike Great tip. I just wish there were a way to do this with those pages where the URL is a page with an embedded PDF.

Thanks! If the PDF is embedded and I really wanted it, I'd probably view the source of the page (right click --> Inspect Element), dig through the HTML, copy the direct URL to the clipboard, paste it into a new tab, and Option-Return to start the download.

I've found those four buttons you mention also show up in embedded PDFs, too.

If you think this is a bug, think again. I bet it's done on purpose to 'force' our behavior into Apple's little world.

I liked (earlier today) to be able to click a PDF and see it open in Reader. Now I am happy to see it open in Safari (after applying the defaults write trick) and am amazed when I hover at the bottom and click the Preview icon that it opens the PDF in Reader. So I'm only an extra hover and click away from where I was.

Now Apple can break this bad behavior and actually make it open in Preview. This is my prediction!

BTW using BBEdit I opened com.appple.Safari.plist and found that in addition to WebKitOmitPDFSupport there is also a WebKit2OmitPDFSupport. Maybe I'll mess around with them...

@Steelydev You had me excited for a minute, but I tried WebKit2OmitPDFSupport and it doesn’t seem to work.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment