, , , , , , , , , ,

Safari (4.0.4) shows PDFs in the browser window by default when you click on a hyperlink to a PDF file. What is happening here is that when you click on the link, Safari downloads the file in the /tmp directory and opens it by itself. I don’t want that — I want to open it in a stand-alone PDF viewer, say Skim, which will allow me to do other PDF-related stuff (e.g. annotation). A command line trick will do the job (enter the following command after the prompt, indicated by $ here, in the terminal):

$ defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES

If you want to go back to the default behavior use the same command but change ‘YES’ to ‘NO’.

NOTE: You may run across a totally different issue which will force you to view a PDF file in the browser window if you have Adobe reader plugin installed. In that case just remove that plugin from the following directories:
/Library/"Internet Plug-Ins"
~/Library/"Internet Plug-Ins"

I have tested this on Mac OSX  – Leopard (10.5.8).

Credit: Mac Rumors forum.