Controlling PDF display in Web browsers (using Preview instead of Adobe Reader or vice versa, etc.); forcing Safari to download
Instructions for controlling how PDFs are displayed or downloaded in various browsers, including Safari.
Less than intuitive are the controls for determining how PDFs accessed through Safari and other Web browsers are displayed. Options are generally hidden within specific applications rather than accessible via universal system controls, and it's sometimes not clear how to invoke given options.
There are two basic alternatives for viewing PDFs from the Web, with variations:
- Display the PDF in the browser window with the aid of either Safari's built-in PDF display, the Adobe PDF Viewer Plug-in, or a shareware utility like PDF Browser Plugin
- Force your Web browser to download the PDF for viewing in Adobe Reader, Preview, or another PDF reading application.
Displaying the PDF in your browser window Controlling which tool displays your PDF within the browser window is relatively easy.
- To display PDFs using the Adobe PDF Viewer, make sure that you have the latest version of Adobe Reader installed (the installer will automatically install the Adobe PDF Viewer at /Library/Internet Plug-Ins/AdobePDFViewer.plugin). Open Adobe Reader (located in /Applications) and select "Preferences" from the "Adobe Reader" menu. Make sure that the option "Display PDF in browser using:" is checked.
- To display PDFs using the built-in WebKit PDF viewer for Safari, open Adobe Reader (located in /Applications) and select "Preferences" from the "Adobe Reader" menu. Make sure that the option "Display PDF in browser using:" is not checked, then restart Safari. Failing this, navigate to /Library/Internet Plug-Ins (the Library folder at the root level of your hard drive) and remove the file AdobePDFViewer.plugin, then restart Safari.
- To display PDFs using the shareware utility PDF Browser Plugin, simply download the file and drag PDF Browser Plugin to /Library/Internet Plug-Ins/, then restart your Web browser.
Forcing Safari to download PDFs This process will force Safari to download a PDF automatically when accessed rather then attempting to display it with a plug-in or the built-in PDF display mechanism. Of course, you can also hold down the option key then click on a PDF download link (or any other link, for that matter) and Safari will download the file, but this method will make the behavior automatic. The procedure is somewhat involved, but shouldn't take more than a few minutes:
- Make sure that you have either installed the Mac OS X Developer Tools disc and the accompanying utility Property List Editor (which will be installed at /Developer/Applications/Utilities/Property List Editor) or download the tool PlistEditPro.
- Quit Safari if it is open
- Navigate to /Library/Internet Plug-Ins (the Library folder at the root level of your hard drive) and remove the file AdobePDFViewer.plugin (the Adobe PDF Viewer plug-in). Store in a separate location in case you would like to restore it later.
- Navigate to ~/Library/Preferences (the tilde [~] represents the current user's home directory)
- Drag the file com.apple.Safari.plist onto the icon of either Property List Editor or PlistEditPro (from step 1).
- Click on the entry "Root," to select it, then click on the disclosure triangle to the left.
- Click on the "New Child" button in the upper-left corner.
- Enter the following text as the child name: WebKitOmitPDFSupport, then press return
- Select the newly created WebKitOmitPDFSupport entry, then choose "Boolean" from the "Class" selector, and "Yes" from the "Value" selector.
- Choose "Save" from the File menu (or press the Command and S keys simultaneously). Make sure that the file is saved as com.apple.Safari.plist in the directory ~/Library/Preferences.
- Launch Safari and attempt to access a PDF file -- it should automatically download rather than display in the browser window.
Like what you've found in this tutorial? Get more troubleshooting guidance (updated daily) by subscribing to MacFixIt Pro.