Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

why does Safari show code when I open a pdf?

I think I remember Preview opening when I clicked on a PDF link. Now, Safari just shows the code. What can I do to fix this, besides using a different browser?

MacBook Pro (13-inch Early 2011), iOS 7.0.3

Posted on Nov 13, 2013 11:02 AM

Reply
Question marked as Best reply

Posted on Nov 15, 2013 8:29 AM

Hello there, Richmondo.


The following Knowledge Base article, although archived, is still practical for Mavericks:


Mac OS X: Double-Clicking a File Opens the Wrong Application

http://support.apple.com/kb/TS2291

To open a document once

  1. Click the document's icon in the Finder to select it.
  2. Choose File > Open With.
  3. Choose the desired application. You may choose Other to select an application not on the list.


To configure documents of this type to open with a certain application

  1. Click the document's icon in the Finder to select it.
  2. Choose File > Get Info.
  3. Click the disclosure triangle next to "Open with:".
  4. Choose the desired application from the "Open with" pop-up menu. You may choose Other to select an application not on the list.
  5. Click Change All.

Thanks for reaching out to Apple Support Communities.


Cheers,

Pedro.

10 replies
Question marked as Best reply

Nov 15, 2013 8:29 AM in response to Richmondo

Hello there, Richmondo.


The following Knowledge Base article, although archived, is still practical for Mavericks:


Mac OS X: Double-Clicking a File Opens the Wrong Application

http://support.apple.com/kb/TS2291

To open a document once

  1. Click the document's icon in the Finder to select it.
  2. Choose File > Open With.
  3. Choose the desired application. You may choose Other to select an application not on the list.


To configure documents of this type to open with a certain application

  1. Click the document's icon in the Finder to select it.
  2. Choose File > Get Info.
  3. Click the disclosure triangle next to "Open with:".
  4. Choose the desired application from the "Open with" pop-up menu. You may choose Other to select an application not on the list.
  5. Click Change All.

Thanks for reaching out to Apple Support Communities.


Cheers,

Pedro.

Nov 16, 2013 8:42 AM in response to Richmondo

You have two in browser PDF viewing options, providing you haven't removed the Apple Quartz Composer webplugin from /Library/Internet Plug-Ins:


  1. Install Adobe Acrobat Reader 11.0.04 and let it upgrade its PDF plugins in the above folder. The Adobe PDF plug-ins will supercede the default Apple PDF plug-in.
  2. Perform the above, and then move the following two files from the above folder (adminstrator password), allowing Apple's PDF plug-in to function:
    1. AdobePDFViewer.plugin
    2. AdobePDFViewerNPAPI.plugin

Nov 16, 2013 10:41 AM in response to Richmondo

Quit Safari, Open Terminal (/Applications/Utilities) & copy/paste the following line, then press enter.


defaults delete -app Safari WebKitOmitPDFSupport


Don't install Adobe Reader's plug-ins unless you need them for the relatively few pdf's that won't display in Safari or Preview.


WebKitOmitPDFSupport used to make Safari download pdf files rather than try to display them - the latest version doesn't handle that & displays them anyway, but as raw data.

Dec 10, 2013 4:16 PM in response to andyBall_uk

This also solved my same issue. I couldn't find the answer elsewhere. It is plain crazy.



andyBall_uk wrote:


Quit Safari, Open Terminal (/Applications/Utilities) & copy/paste the following line, then press enter.


defaults delete -app Safari WebKitOmitPDFSupport


Don't install Adobe Reader's plug-ins unless you need them for the relatively few pdf's that won't display in Safari or Preview.


WebKitOmitPDFSupport used to make Safari download pdf files rather than try to display them - the latest version doesn't handle that & displays them anyway, but as raw data.

why does Safari show code when I open a pdf?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.