6

Today, Apple updated Safari to 5.1 (6534.50).

In Safari 5.0 or below it's very easy to disable opening pdfs inline, you simply say

defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES

and it never bothers you again.

In Safari 5.1 this no longer works. Does anyone know an alternative to prevent Safari 5.1 opening PDFs in the browser rather than as a download and then in Preview?

2 Answers 2

1

I don't know of any way to disable inline PDF viewing, but option-clicking on a link will force a download instead. Not exactly what you asked for, though...

What's interesting is that some PDFs actually get downloaded instead of previewed, so that could be a starting point for a hack: http://www.jbc.org/content/279/1/686.long (click on the link 'Full Text PDF').

3
  • But that's probably the way the jbc.org page behaves, regardless of whether it's being viewed with Safari 5.1 or 5.0 (or other browsers, no doubt).
    – jwn2
    Jul 22, 2011 at 21:41
  • 1
    nope, it doesn't get downloaded with safari 5.0.x; it's supposed to open in-line in that frame but doesn't (I think; I'm running snow leopard on this computer)
    – Noah
    Aug 11, 2011 at 14:09
  • This is interesting. My intranet web app also uses frame (actually a lightbox with an iframe) to show PDF content within the site. On Lion/Safari 5.1, clicking a link that used to open the content within the lightbox now opens the lightbox, then downloads the PDF. Right-clicking the link and selecting "open in new tab" does accurately render the PDF within the browser.
    – r00fus
    Aug 31, 2011 at 22:55
1

As cparnot mentions, this doesn't seem to be possible anymore, but you can work around it by option-clicking on PDF links. However, this doesn't always work; sometimes, links are opened with JavaScript code that ignores the option key.

In those cases, wait until the PDF's URL appears in the address bar, click into the address bar, hit option-return, and then hit back. That will start downloading the PDF and bring you back to the previous page.

You must log in to answer this question.

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