Apple Event: May 7th at 7 am PT

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

Cannot View or automatically download PDFs in Safari 7.0

This is a bizarre problem since the Safari 7.0 update. If I click on a link for a PDF, instead of downloading the PDF and opening Acrobat or Preview, I just get a page of the underlying code.


E.g., clicking on http://images.apple.com/media/us/osx/2013/docs/OSX_Mavericks_Core_Technology_Ove rview.pdf


gives me:


%PDF-1.5 %âãÏÓ 1101 0 obj <> endobj xref 1101 29 0000000016 00000 n 0000002539 00000 n 0000002690 00000 n 0000003122 00000 n 0000003237 00000 n 0000004185 00000 n 0000004648 00000 n 0000004761 00000 n 0000005026 00000 n 0000005537 00000 n 0000006159 00000 n 0000006419 00000 n 0000007050 00000 n 0000017804 00000 n 0000025298 00000 n 0000025328 00000 n 0000025454 00000 n 0000025490 00000 n 0000025567 00000 n 0000039803 00000 n 0000040145 00000 n 0000040214 00000 n 0000040332 00000 n 0000040409 00000 n 0000040687 00000 n 0000043992 00000 n 0000103676 00000 n 0000002338 00000 n 0000000876 00000 n trailer <<7ECE529081E14E87910F79877C04D8A0>]/Prev 4452637/XRefStm 2338>> startxref 0 %%EOF 1129 0 obj <>stream hÞ´T&#127;P’g ÿ>€ ˆ &#144;” …° ašÓrˆŒÈ• ™3ónh&#157;Õ•— ×&#143;[5TÒ—Ê™^®U¶ uYËSS7·öC·Ì~l&#157;m-]k7ÙêÔ®:-k»vÝíá ”ÖþÝóÜËû}>ßïçûóá í;ðÿTàÁÔâAÞ4 wÁM@tð³@6Ò U0w#€…¿QEÕ`–¡%ÈY ˜ ,©ˆÊ c~ 7õ¬Žˆr{à1 Ô >Ÿ; D#P¶Íy Z ¬ p²•ÙÊÉy¾=ûíyÐ× ø ´« [øÙ†²¨ª°Ð&#157;ÜY ÷ÏTéÆËzm¡ŠÌêz-‹?GwC8•#¯†Êâ%T#8©=”]_Þ/J6ÓS/×й‚!ûï ɲ BÞ 6YßVZiW &#141;N8/ º Iš¾ALþô +úí¼M¦Nä »Y&#141;y$X¨/ s£ Ùä *gvnEÚ~Qè.çÍåaíù‚4MŸÅê_) öä ¡²[4ið ûÑÚÒTbS‘±s_ª&#141;]=ÿÎRC ýîy»£ÄžYÈ Ï¯‹H ‹e?œÄº¡¼ÒfÓg9½1·˜kÍ&#127;uÈ‚Î d¼Ñ«E"N£æÁ CŽ’ã Oy c ûÕCƒ Zò ‰’&§•òëÕƘig lC_@†CµÉäá™]ñšó Q* ÉMÎ 4Y¦±m•oEž ã¿ŒD÷ Õ»œ c‚ÅVœ™KW)—¦¯þjÛø});²'ÁüŒ£ : 謶* ¥R>ëÔ+ •l&#144;]‚] ™‘¹äDÒ žba«ýõ×h£ã:}x ‹®s`ÝN傦z ÷Z t€p»ÖÖrîž óc í&#143;{ ¬LÜeäù÷–¹ Ç ™©©å«¤Áû’÷B{Þä ‹žñ(• \‘xM Ô§ÙÎ ^’+À&õy/Ìo˜m&#143;—™:A ಼TSïæ]äÛI×t?œgz¤Úbh QñTpfU‰[nËLë ɳ™ÔüŸÎ Éú0(ä-5t%˜ ²iáÁ µkÄÚZ¶¢'3&#144;ï ± ÌjK[ÐtHÎ÷Î&#157; ¤ 95÷¶ q7½Áÿ¢Œ´¬ŽÒ²éúîku®¬ó¿u݉!‹¡QcvNÈü¼ 4µáÛÙøÒþ|I ¹¯tbñ•?7æ|YÐûUd½à è“¢G@ &#141;îÅؤìÎÈÝ"¾·?4&#141;ÛÀó}! äA =ÕE WüŸ2f¿ä ÷’ði¿×/W åMÛ»þ¿ï) x æÓßÁïéøÙL¦ lT ÙÔ#¨ ²à!ºCY £”ÜÙà 1@…5Àå ” rX Jø›um” b Cà #i@ 0 O N ExN ”bJê v Gè :&#141;G² óâBk°ö)0Y `h&#143;Á^x @ lƒÝ oÁ ˆÃ» Î (etc.)


I get pages of this code.


If I do a "Save As" of this page in Safari, then it saves it as a proper PDF, viewable by any PDF reader. This happens on all PDFs, not just Apple's. I installed Mavericks and Safari 7.0 at the same time, so I don't know when the problem began. This happens on both my iMac and MacBook Air. I changed the default viewer from Acrobat to Preview, but it did not help.


I feel like I've been transported back in time 15 years when this is how files were exchanged...


Any ideas?


Running:

  • Safari 7.0
  • OS 10.9 Mavericks


on

  • iMac i7
  • MacBook Air i7

OS X Mavericks (10.9)

Posted on Oct 24, 2013 5:15 PM

Reply
44 replies

Oct 30, 2013 11:02 AM in response to cm477

In addition to the shell command :defaults write com.apple.Safari WebKitOmitPDFSupport -bool NO", if you are running the System Preference Pane "Secrets," make sure that the Safari setting "Load PDFs in Browser" is selected. I don't know how many of the Mac OS settings are still customizable in Mavericks with Secrets, especially since it looks like Secrets hasn't been updated since 2008.


Secrets: https://code.google.com/p/blacktree-secrets/

Nov 6, 2013 10:34 AM in response to cm477

A year ago, I was able (somehow) to set Safari to do the following: when I clicked on a link to a pdf file, it just downloaded the pdf file to a folder without opening it. In Safari Preferences > General, I defined that folder as "Downloads" and I unchecked the "Safe open" box. I believe that this is what you and garylapointe were doing also.


As of yesterday, it stopped working, and I'd get a new tab with all the gibberish one would expect if Safari is trying to interpret a pdf file on its own. I ran "defaults write com.apple.Safari WebKitOmitPDFSupport -bool NO" so that I can at least get rid of the gibberish and see the pdf file in Safari, until I can figure out how to disable it opening in Safari and just to download.


If and when I find a solution I'll post it here. Just to be clear: my goal isn't to view pdfs in Safari when I click on a link to a pdf file, but to just download them to the folder I define in Preferences > General. No right-clicks, no drop-down menus were needed until yesterday.

Nov 8, 2013 11:12 AM in response to akhannides

That is broken in Safari 7/Mavericks. Right now it is a bug and cannot be fixed. I've been reading this thread, other threads, and other resources, and it's just plain broke.


In the meantime you can get PDFs to display within Safari 7 by:


defaults write com.apple.Safari WebKitOmitPDFSupport -bool NO


That isn't what you (nor I) want: we want to click a link for the PDF and have it download automatically to the Downloads folder (or wherever). But that is BROKEN right now, and if you set the logical argument on the string above to 'YES' you'll get the gibberish problem.


Apparently a bug report has been filed to Apple. In the meantime you'll have to display the PDF in Safari and THEN save it using the save icon.


Sorry.

Nov 8, 2013 12:39 PM in response to akhannides

Akhannides: Interesting that you are still running Safari 6.1 and Lion, yet this problem appeared for you just recently. I was thinking it was exclusively a Safari 7.0 and Mavericks issue.


From other posts, it appears that this bug has been reported to Apple. Hopefully that is the case and it will soon be fixed (as they recently did with Apple Mail's issues).

Dec 19, 2013 4:52 PM in response to cm477

Well, I thought that changing the shell command:


Terminal command:

defaults write com.apple.Safari WebKitOmitPDFSupport -bool NO


more or less fixed my problem, but it only did so for several weeks. Sometimes when I would click on a page for a PDF, I would just get a blank gray page. If I clicked on that page, I could usually get the PDF to load and open within Safari.


But now, for the past several weeks on my iMac, I cannot get any PDF to display within Safari. I just get that gray page and no matter where I right or left click, or refresh, I cannot get PDF's to display within Safari. I didn't change any setting or install any updates in that time. Now I just try to right-click the PDF link and download the file. Sometime this doesn't even work, so I copy the link and open it in Chrome or Firefox. I can still view PDF's within Safari with my MacBook Air.


I didn't post anything sooner because I was hoping Safari Version 7.0.1 (9537.73.11) would address the issue. It hasn't. I seem to have a problem with Adobe in general because I often cannot see the windows of videos that use flash.


This is pretty frustrating. I wish I could just re-install Safari, but of course now that is impossible.

Mar 27, 2014 7:14 PM in response to cm477

Just tried the old faithful again, in the off-chance they work as they used too:

defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES

defaults write com.apple.Safari AutoOpenSafeDownloads -bool NO

They now do! I click on the link and it just downloads uncorrupted without opening anywhere.
For the record, I am running Safari 6.1.2 on 10.7.5.

Cannot View or automatically download PDFs in Safari 7.0

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