MacOS – How make Safari download PDF files instead of opening them in-page

macossafari

Firefox downloads my PDF files straight to "Downloads", Safari opens them "in-page".

I need PDF files to save to a file, not to open.

Is there a setting make Safari download PDF files instead of opening them in-page?

Best Answer

Open up a terminal window: space and type Terminal. Hit enter when its highlighted. When you get to the terminal prompt, type the following command:

defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES

You won't get a response at the command line, but once you restart Safari it will no longer open them in the browser.

To take it a step further while you're there, you can keep it from opening them once they are downloaded with this one:

defaults write com.apple.Safari AutoOpenSafeDownloads -bool NO

This last command achieves what the other answer suggests.