33

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?

14 Answers 14

29

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.

5
  • 2
    This does not work on MacOS Sierra. Dec 18, 2016 at 16:38
  • @VladimirNul If this is still an issue for you, or for others that see this, see my recently added answer -- hope it helps.
    – Dennis
    Oct 12, 2017 at 21:41
  • This is the same to apple.stackexchange.com/a/57045/285948, the only diff is that the configuration is directly from the browser, not command line Aug 1, 2018 at 16:07
  • 1
    This method no longer works with Safari 12
    – Eir Nym
    Apr 21, 2019 at 8:03
  • I'm using Safari 13.1.2, macOS 10.14.6, and this answer worked while @Dennis's promising answer did not. Jul 30, 2020 at 15:11
25

You can make Safari on the Mac download ANY files (mp3, mp4, jpg, pdf and more) by doing the following.

  1. Open the file (movie,music,etc) in Safari. That normally comprises of clicking the link to the pdf/movie/music etc.
  2. Select the url in the browser (by clicking it, or by pressing ⌘ cmdL).
  3. Hold option down (⌥ alt) and press Enter.

The file you are viewing downloads to the Downloads folder on the mac.

I've tested this with almost all file types possible. Very very useful little feature that unfortunately too few people know about.

2
  • This should be the answer. The accepted answer is very nerdy.
    – Ahuman
    Apr 18, 2020 at 20:19
  • But correct, if what you want is to always download PDFs on clicking them.
    – piersb
    Apr 27, 2022 at 12:34
11

Better yet, you can just hold down alt when you click.

1
  • This will download the linked file. The problem is that this is often an HTML file (which then downloads the actual pdf file). Given that, this method will usually not give you the intended results.
    – Christoph
    Sep 23, 2022 at 9:26
3

When you click on a link to a PDF, hold down the control key. A menu pops up. Select "Download Linked File as..."

3

As has been noted by others, the accepted answer that modifies the Safari plist does not work as of Sierra (Safari 10+?).

The method I used (on High Sierra) was to navigate to /Library/Internet\ Plug-Ins/ (terminal or via Go in finder). There were two plugins AdobePDFViewer.plugin and AdobePDFViewerNPAPI.plugin. I moved both of these to the /Library/Internet\ Plug-Ins/Disabled\ Plug-Ins directory. Upon restart, Safari stopped automatically opening pdfs in its viewer.

I haven't been able to find the relevant .plist setting to disable or modify this behavior in a less "brute" way.

3
  • 1
    Disabling Adobe's plugin is my favorite thing to do after installing Adobe Reader. The Preview plugin is lighter in my experience.
    – ephsmith
    Oct 14, 2017 at 15:55
  • Thanks. I needed sudo to do this; sudo mv AdobePDFViewer... Jul 30, 2020 at 3:01
  • I'm using safari 13.1.2 and this did not work, whereas the accepted answer did. Jul 30, 2020 at 15:12
1

None of the right-click stuff that should be working is working properly for me (I have a very fussy link). But I have found that if you are looking at the document in-page, if you hover towards the bottom of the window you should get a black control bar... the disk icon will save the pdf to disk.

0

Safari automatically opens many files in the browser window. If you want to download any of those files follow these steps:

1) Click on the Firefox menu and select Preferences

2) In the window that opens click on the Applications tab

3) In the column named Content Type scroll down to the type of content you are trying to download (or type the file type in the search field)

5) When you find it, click on the action popup (to the right) and change it from Preview in Safari to Save file

6) Try the pasting the URL of the file you want to download into the browser again and it should now start to download (or ask you where to save it!)

2
  • 2
    You lost me at Firefox.
    – Ray Baxter
    Oct 4, 2015 at 21:48
  • Well if Firefox has a nice GUI for all of these file settings why wouldn't you want to use it Ray? Still there after all these years. Thanks Gavin/Jawa. Nov 29, 2016 at 12:07
0

Holding option while clicking on a link will automatically download the target instead of opening it.

0

If you've already opened a PDF in Safari, hold option down and click anywhere then open the file with Preview and you could find a function named Save under the File menu.

-1

simple. after you open the pdf page, click File then click Export as PDF

-1

Right click on the pdf link and click < Download Link File >.

1
  • 2
    Welcome to Ask Different. We like answers to be more than just a single line. Ideally, you want to explain why your answer is *right." It also helps to provide links, citations, and/or screen shots. Please review our help section How to Answer on writing good answers to questions
    – Allan
    Jun 5, 2016 at 21:04
-2

Open the pdf right click --> view/open in preview the file will open in preview save the file

2
  • 1
    Can you elaborate a bit, right now it's difficult to understand what the procedure is
    – nohillside
    Oct 5, 2015 at 9:41
  • Provides a work around, but does not answer the actual question of whether or not a setting is available. Oct 8, 2015 at 6:36
-3

From this article:

Go into the Preferences and simply un-tick the option Open “safe” files after downloading.

enter image description here

4
  • Tried it. Doesn't work. Jul 22, 2012 at 3:37
  • Doesn't work. :( Jul 22, 2012 at 11:11
  • This option is for something different -- it controls whether downloaded files are opened automatically or not.
    – jmk
    Feb 4, 2013 at 2:20
  • This worked for me +1 Aug 1, 2018 at 16:06
-3

Press print and then click on PDF, and then save as PDF.

You must log in to answer this question.

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