Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting Safari to open PDF files in Preview, NOT Safari (under Mavericks)

4,150 views
Skip to first unread message

DaveC

unread,
Nov 7, 2013, 4:51:26 AM11/7/13
to
In past OS X versions I've used a Terminal command to set my PDF viewer
preference to Preview rather than Safari. This is the method for Mavericks,
supposedly:

<http://apple.stackexchange.com/questions/106660/how-make-safari-7-open-pdf-
files-in-preview-instead-of-opening-them-in-page>

The desired result is that after clicking on a link that is the URL to a PDF
file, Preview launches and the PDF file displays in that application. 

For me this does not happen. Instead, a new web page opens in Safari and
garbage fills the page.

Any idea how I can get a PDF file on the web to download and open in Preview

Thanks,
Dave

OS X 10.9 Mavericks
Mac mini (2011_5,3): 2.7 GHz dual i7 / 16 GB / 250 GB & 750 GB

Message has been deleted

Barry Margolin

unread,
Nov 7, 2013, 1:30:51 PM11/7/13
to
In article <vilain-D6F79F....@news.individual.net>,
Michael Vilain <vil...@NOspamcop.net> wrote:

> In article
> <0001HW.CEA05C4E...@news.eternal-september.org>,
> The standard way for quite some time was to select the PDF file in the
> Finder, then click Command-I to Get File Information. In that dialog,
> there's a "Open With" drop down selector. The default application for
> .PDF is displayed. If you click on the default and let the selection
> drop down to Safari, it will open that file with Safari. If you click
> on the Change All button, all files with the .pdf extension will be
> opened with Safari.

That setting is for double-clicking on files that have already been
downloaded. The question was about how to open PDF web pages this way.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Message has been deleted

Doc O'Leary

unread,
Nov 7, 2013, 4:44:52 PM11/7/13
to
> The desired result is that after clicking on a link that is the URL to a PDF
> file, Preview launches and the PDF file displays in that application.�
>
> For me this does not happen. Instead, a new web page opens in Safari and
> garbage fills the page.

Uh, perhaps that "garbage" *is* the PDF. Which is to say, the server
might be more at fault than your Mac. How about giving a URL so that we
have some chance of seeing what you're seeing?

--
iPhone apps that matter: http://appstore.subsume.com/
My personal UDP list: 127.0.0.1, localhost, googlegroups.com, theremailer.net,
and probably your server, too.

Paul Sture

unread,
Nov 7, 2013, 5:43:14 PM11/7/13
to
Doc O'Leary wrote:

> In article
> <0001HW.CEA05C4E...@news.eternal-september.org>,
> DaveC <inv...@invalid.net> wrote:
>
>> The desired result is that after clicking on a link that is the URL to a PDF
>> file, Preview launches and the PDF file displays in that application.�
>>
>> For me this does not happen. Instead, a new web page opens in Safari and
>> garbage fills the page.
>
> Uh, perhaps that "garbage" *is* the PDF. Which is to say, the server
> might be more at fault than your Mac. How about giving a URL so that we
> have some chance of seeing what you're seeing?

I had exactly this problem with an online bill.

"Garbage" was displayed but it looked like a PDF when you open one in a
text editor. Mine came up in an A4 sized popup window

I simply did a File Save and could read the resulting file in Preview.
I'll note here that the file was saved with the usual file naming
convention used by that web site, so was easy to find.


--
Paul Sture

DaveC

unread,
Nov 7, 2013, 6:54:57 PM11/7/13
to
> Inside of Safari or any other web-browser, I've used a separate utility
> that sets the "helpers" database. I've used it since 10.2 and it still
> works.
>
> https://www.macupdate.com/app/mac/14618/rcdefaultapp

Thanks for that possibility Michael. I installed it.

But my experience is unchanged. When I click on a link that is a PDF file it
opens in a browser window.

I've configured RCD as best I can figure it out. Seems that for PDF it's
already pretty well set-up. Under "Extensions" I did check the box "Override
file creator" for PDF.

This is an example of what I want to open in Preview:

<www.irs.gov/pub/irs-pdf/f8880.pdf>

Nothing fancy about the file...

Ideas?

Thanks!

Barry Margolin

unread,
Nov 7, 2013, 7:07:08 PM11/7/13
to
In article
<0001HW.CEA12201...@news.eternal-september.org>,
The main issue is that you have to convince Safari that it should
download the file instead of just linking to it. Once it downloads, the
preference from Get Info or RCDefaultApp will take effect.

You can force a download with Option-click.

notme

unread,
Nov 7, 2013, 7:13:23 PM11/7/13
to
> The main issue is that you have to convince Safari that it should
> download the file instead of just linking to it. Once it downloads, the
> preference from Get Info or RCDefaultApp will take effect.
>
> You can force a download with Option-click.

Which makes it a 2-step process.

In Snow Leopard I could Cmd-Click on a link and it would 1) download the PDF
and 2) open it in Preview in 1 step.

I'm looking to duplicate that process in Mavericks.

Thanks.

Barry Margolin

unread,
Nov 7, 2013, 7:35:57 PM11/7/13
to
In article
<0001HW.CEA12653...@news.eternal-september.org>,
notme <no...@notme.org> wrote:

> > The main issue is that you have to convince Safari that it should
> > download the file instead of just linking to it. Once it downloads, the
> > preference from Get Info or RCDefaultApp will take effect.
> >
> > You can force a download with Option-click.
>
> Which makes it a 2-step process.

Have they removed the "Open safe documents after downloading" option
from Preferences->General?
>
> In Snow Leopard I could Cmd-Click on a link and it would 1) download the PDF
> and 2) open it in Preview in 1 step.

Cmd-Click is "Open link in new window", isn't it?

Whether it does #2 is controlled by the above preference.
Message has been deleted

DaveC

unread,
Nov 7, 2013, 7:54:54 PM11/7/13
to
> Have they removed the "Open safe documents after downloading" option
> from Preferences->General?

It's there in Mav. But it lies. No opening after downloading. Still opens in
Safari.

>> In Snow Leopard I could Cmd-Click on a link and it would 1) download the
>> PDF and 2) open it in Preview in 1 step.

> Cmd-Click is "Open link in new window", isn't it?

Right you are. But click the link or Cmd-click, both will open the PDF in a
Safari window.

> Whether it does #2 is controlled by the above preference.

Supposedly. But it doesn't. Hence my questions here.

Thanks.

DaveC

unread,
Nov 7, 2013, 7:56:00 PM11/7/13
to
>
<http://apple.stackexchange.com/questions/106660/how-make-safari-7-open-pdf-
fi
> les-in-preview-instead-of-opening-them-in-page>
>
> That is *not* for Mavericks. that worked in 10.6 (and maybe 10.5?) but
> it doesn't work in 10.9.

OK, thanks.

On to other possibilities.

David Empson

unread,
Nov 7, 2013, 7:58:25 PM11/7/13
to
DaveC <inv...@invalid.net> wrote:

> In past OS X versions I've used a Terminal command to set my PDF viewer
> preference to Preview rather than Safari. This is the method for Mavericks,
> supposedly:
>
> <http://apple.stackexchange.com/questions/106660/how-make-safari-7-open-pdf-
> files-in-preview-instead-of-opening-them-in-page>
>
> The desired result is that after clicking on a link that is the URL to a PDF
> file, Preview launches and the PDF file displays in that application.
>
> For me this does not happen. Instead, a new web page opens in Safari and
> garbage fills the page.

That article says the method which _previously_ worked (defaults write
com.apple.Safari WebKitOmitPDFSupport -bool YES) does not work any more
with Safari 7. Incidentally, the same applies to Safari 6.1.

With that setting, earlier versions of Safari would download a PDF with
a simple click on a link, rather than displaying the PDF in Safari. (You
also had to get rid of the Adobe PDF plugin, if you had installed Adobe
Reader.)

I already had that setting enabled, and had the same problem with Safari
6.1 and 7. Until a better solution presents itself, I've turned off that
setting with:

defaults write com.apple.Safari WebKitOmitPDFSupport -bool NO

This restores the standard behaviour of Safari, and PDFs are now
displaying in Safari (rather than seeing a page full of the raw data of
the PDF in text form). From there, I can save them.

Alternatively, I can secondary click on the link and choose Download
Linked File, but this is a nuisance as some web sites don't make it
clear that the link you are about to click on is a PDF rather than
another web page.

--
David Empson
dem...@actrix.gen.nz

Neill Massello

unread,
Nov 7, 2013, 8:04:00 PM11/7/13
to
DaveC <inv...@invalid.net> wrote:

> In past OS X versions I've used a Terminal command to set my PDF viewer
> preference to Preview rather than Safari. This is the method for Mavericks,
> supposedly:
>
> <http://apple.stackexchange.com/questions/106660/how-make-safari-7-open-pdf-
> files-in-preview-instead-of-opening-them-in-page>
>
> The desired result is that after clicking on a link that is the URL to a PDF
> file, Preview launches and the PDF file displays in that application.
>
> For me this does not happen. Instead, a new web page opens in Safari and
> garbage fills the page.
>
> Any idea how I can get a PDF file on the web to download and open in Preview

The setting in TinkerTool that used to do this is also now gone,
presumably because the current version of Safari no longer supports it.
The only way to do this now seems to be "Download Linked File" on the
contextual menu.

DaveC

unread,
Nov 7, 2013, 8:05:20 PM11/7/13
to
> Alternatively, I can secondary click on the link and choose Download
> Linked File, but this is a nuisance as some web sites don't make it
> clear that the link you are about to click on is a PDF rather than
> another web page.

So there is currently no known way to automatically download & open PDF files
in Preview with 1 click?

Thanks,
Dave

Barry Margolin

unread,
Nov 7, 2013, 8:17:02 PM11/7/13
to
In article
<0001HW.CEA13280...@news.eternal-september.org>,
I think the issue is whether Safari considers PDF files to be "safe".

I use Chrome, not Safari. Sometimes it downloads a PDF and opens it
immediately. Other times it downloads the PDF and then displays a
warning at the bottom that the file may be dangerous, do you want to
keep it?

So it seems like there are different kinds of PDF files, and some of the
contents may render them "unsafe". When they're not safe, you have to
open them manually.
Message has been deleted

dorayme

unread,
Nov 7, 2013, 9:34:50 PM11/7/13
to
> > The main issue is that you have to convince Safari that it should
> > download the file instead of just linking to it. Once it downloads, the
> > preference from Get Info or RCDefaultApp will take effect.
> >
> > You can force a download with Option-click.
>
> Which makes it a 2-step process.

Which is not so bad surely, it is not as if there is any time
consuming double downloading. But, no, I know, it is not exactly what
you want. Another 2-step process, I might as well mention, is to let
it open in Safari and right or control click and your contextual menu
might say, as does mine, Open in Preview. Another plugin I have,
Schubert's, has a button on it to give you an option to open in
Preview (or whatever you want).

--
dorayme

dorayme

unread,
Nov 7, 2013, 9:40:00 PM11/7/13
to
In article <barmar-964ED1....@news.eternal-september.org>,
Barry Margolin <bar...@alum.mit.edu> wrote:

> it seems like there are different kinds of PDF files, and some of the
> contents may render them "unsafe". When they're not safe, you have to
> open them manually.

Interestingly, there are *some* PDFs that will happily open in iCab in
Schubert's PDF plugin but will give an error when the Open in External
Viewer button (in that plugin) is pressed. I don't think in this case
it is about safety, but I don't know this. On Snow Leopard.

--
dorayme
Message has been deleted

Wes Groleau

unread,
Nov 7, 2013, 11:13:43 PM11/7/13
to
On 11-06-2013, 23:51, DaveC wrote:
> The desired result is that after clicking on a link that is the URL to a PDF
> file, Preview launches and the PDF file displays in that application.
>
> For me this does not happen. Instead, a new web page opens in Safari and
> garbage fills the page.

I do not know how to change the choice from in-line viewer to Preview.

But I suspect that seeing "garbage" instead of what you are supposed to
see is because the web server identified the item as something other
than PDF, i.e., as 'test' or 'html'

As others asked, can you provide the URI?

If not, turn on your Develop menu and see if that will help you
troubleshoot.

Or just change browsers permanently or temporarily.

--
Wes Groleau

Pat's Polemics
http://Ideas.Lang-Learn.us/barrett

David Empson

unread,
Nov 7, 2013, 11:21:35 PM11/7/13
to
Not as far as I can tell.

I have the 'Open "safe" files after downloading' preference disabled,
but that preference is only relevant once Safari has downloaded a file.
If Safari shows you the PDF content (or the raw text of the PDF) in its
own window/tab, then it isn't downloaded and isn't opened in Preview.

--
David Empson
dem...@actrix.gen.nz

Barry Margolin

unread,
Nov 8, 2013, 12:53:55 AM11/8/13
to
In article <1lc0n89.6ku80m11m0rl9N%dem...@actrix.gen.nz>,
That's why I suggested Option-click. That forces Safari to download
instead of show -- it works for any type of file (if you Option-click on
a regular link, you'll get the HTML file in your download location).
Message has been deleted

Your Name

unread,
Nov 8, 2013, 5:37:03 AM11/8/13
to
In article <dorayme-4203B8...@news.albasani.net>, dorayme
The PDF standard comes in different versions, so it depends on what
version the reader application can understand. It also depends on how
close to the standards the application making the PDF was.

Some PDF documents open fine on my Mac OS X 10.2 PowerMac, some throw
up an error saying "some things may not display properly" but still
show up on-screen, and others refuse to open at all. Some will not work
in Preview, but work fine in full Acrobat. If I copy them across to the
Mac OS X 10.5 MacBook, then most of them open fine on that, but some
still cause errors.
Message has been deleted

Barry Margolin

unread,
Nov 8, 2013, 3:57:49 PM11/8/13
to
In article <vilain-4F643E....@news.individual.net>,
Michael Vilain <vil...@NOspamcop.net> wrote:

> In article <barmar-D887AF....@news.eternal-september.org>,
> Barry Margolin <bar...@alum.mit.edu> wrote:
>
> > In article <1lc0n89.6ku80m11m0rl9N%dem...@actrix.gen.nz>,
> > dem...@actrix.gen.nz (David Empson) wrote:
> >
> > > DaveC <inv...@invalid.net> wrote:
> > >
> > > > > Alternatively, I can secondary click on the link and choose Download
> > > > > Linked File, but this is a nuisance as some web sites don't make it
> > > > > clear that the link you are about to click on is a PDF rather than
> > > > > another web page.
> > > >
> > > > So there is currently no known way to automatically download & open PDF
> > > > files
> > > > in Preview with 1 click?
> > >
> > > Not as far as I can tell.
> > >
> > > I have the 'Open "safe" files after downloading' preference disabled,
> > > but that preference is only relevant once Safari has downloaded a file.
> > > If Safari shows you the PDF content (or the raw text of the PDF) in its
> > > own window/tab, then it isn't downloaded and isn't opened in Preview.
> >
> > That's why I suggested Option-click. That forces Safari to download
> > instead of show -- it works for any type of file (if you Option-click on
> > a regular link, you'll get the HTML file in your download location).
>
> If Safari is accessing the file via a link, I think there's a way to
> send MIME headers that tell Safari to download the file rather than
> display it. But it's not something you set on Safari, it's what the
> server sends to Safari. No way to change that behavior, AFAIK.

That's true, a server can say "This is an attachment, download it
instead of displaying it". That can be done with any type of file.

But when the server *doesn't* say that, you can still force a download
with the Option key, or Right-click and select "Save Link As...".
0 new messages