Techsurvivors

Welcome to Techsurvivors => Tech => Topic started by: jb on April 18, 2012, 04:04:19 PM

Title: Safari does not open .pdf file.
Post by: jb on April 18, 2012, 04:04:19 PM
iMac Intel i3 21.5" OS 10.6.8

With Safari 5.1.5, why is it that I get a blank black page when the page is a .pdf file?
Safari used to open .pdf file OK. I don't know why it does'nt anymore.

With Firefox 3.6.8, the .pdf file opens OK.

jb
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 18, 2012, 04:20:22 PM
I believe you need a plugin for that. I think you can access that plugin from Adobe Acrobat or Reader (neither of which I have installed). You can probably also download the plugin from Adobe.
Title: Safari does not open .pdf file.
Post by: jchuzi on April 18, 2012, 05:19:01 PM
I don't believe that you should need a plugin, contrary to Jim's advice. Safari (supposedly) has the ability to open PDFs without any extras. Can you post a link so that we can confirm the problem?

Also, you might try PDF Browser Plugin in the (not terribly unlikely) event that I'm wrong. For the record, I used to use that plugin in previous versions of Safari but haven't felt the need because Safari seems to handle PDFs just fine without it.
Title: Safari does not open .pdf file.
Post by: jb on April 18, 2012, 07:18:15 PM
PDF Browser Plugin did not help. The link is here
Here is a picture.

[attachment=2553:Safari_pdf_.jpg]

jb
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 18, 2012, 09:12:07 PM
Well, your screen is the same as mine, but the link doesn't do anything except to open an OpenDNS site allowing one to actually enter a url. I have not used/installed any Adobe Plugin as I don't care to use their Reader nor pay for Acrobat. Many have asked how to get Preview to open a PDF when their version of Safari keeps using Adobe Reader. I don't view a PDF in Safari ever, although I often download them for viewing in Preview. There are other posts, from a couple of years ago complaining about Safari no longer being able to view PDFs as it did when the poster was using Tiger, etc. If Safari is supposed to display PDFs I don't know how to make it do it. dntknw.gif

According to this link, Apple seeded a version of Safari (5.1.2) to developers that was supposed to display PDFs some months ago. I have reinstalled Default Apps and it has both "pdf" and "PDF" shown as opened by Preview. I will change the "pdf" to Safari, quit and restart it and see if that forces it to show a PDF. dntknw.gif
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 18, 2012, 09:18:35 PM
Safari Help claims that when a PDF is displayed in Safari a 'toolbar' will appear near the bottom, center of the window, probably similar to the QuickTime player controls. It does not appear on my black screen, nor did changing the app that handles "pdf" in RCDefaultApp 2.0.1. I had removed that from my System Prefs since it only runs in 32bit mode.

There is a <seven page discussion> on Apple's Forums listing about six ways people have suggested getting PDFs to be viewed in Safari. Works for some, not for others. But the last post is quite old, Dec. 2011. OK, the actual last post is this month, but it doesn't really say anything useful.

According to this <MacWorld article>, Safari 5.1.2 was to have improved PDF viewing.

I guess my point is that this is not an isolated or even recent problem. I just haven't bothered trying to fix it on my machine.
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 18, 2012, 09:43:49 PM
Perhaps you could share a link to a page/site or two that have a PDF available for viewing. The only one I have a recent history on is basically a site that expects you to download the PDFs.

BTW, changing the "defaults write com.apple.Safari WebKitOmitPDFSupport -bool false" value from "falls" to "true" made no difference, either. All the changes I have made have included Quitting and Restarting Safari, BTW. dntknw.gif

So, Jon, what, if any files do you have in your ~/Library/Internet Plug-Ins/? All I have is one for Picasa. However, in Library/Internet Plug-Ins, there are several including one for QuickTime.
Title: Safari does not open .pdf file.
Post by: Paddy on April 18, 2012, 10:08:39 PM
Jim, I've never had a problem viewing PDFs in Safari. If you look at Safari->Help->Installed Plug-ins, what do you see?

The last one in my list is WebKit built-in PDF. I didn't put it there - it came with Safari. It's there on both my 10.6 and my 10.7 machines, latest version of Safari on both.

Recently, I decided to add PDF Browser Plugin for Firefox - which, because it installs in the Internet Plug-Ins file, works for all browsers, and overrides the Safari/webkit one. The only annoyance there is that it requires me to click on the screen for it to display in Safari - I'm not sure why. (I may try removing the webkit plugin to see if that solves the problem) It works fine in Firefox, and Chrome, once I disabled Chrome's built-in PDF viewer. PDF Plugin has more options/better display.
Title: Safari does not open .pdf file.
Post by: Paddy on April 18, 2012, 10:31:35 PM
First off, I fixed your link, JB. wink.gif

And I had no issues viewing the PDF in Safari - other than the continuing wacky behaviour where it refuses to show without clicking on the page (which does have "PDF Browser Plugin 2.4.4" in dark gray on a lighter gray background). It seems the built-in Webkit version of the PDF plugin is not something that can be removed - it's not in any of the usual spots (Library->Internet Plugins in either the user or the root level). Oh well.

Aha...more hunting around and I found a built-in PDF viewer for Firefox ONLY, which leaves my Safari and Chrome built-in PDF viewers alone (which I do prefer, given the nuisance that the PDF Browser Plugin has created in Safari) I'll give up the page numbering and other options for the speed/ease of the built-in versions.

https://addons.mozilla.org/en-US/firefox/addon/pdfjs/ Works fine - just don't forget to restart FF after you install it (or it may crash, as mine did)

JB, what do you see when you look in Safari->Help->Installed Plugins? Are both the Webkit PDF viewer and the PDF Browser Plugin 2.4.4 there? What other plugins do you have? (Take screen shot and post here - that's the easiest)
Title: Safari does not open .pdf file.
Post by: Paddy on April 18, 2012, 10:50:33 PM
Ah...went back and read your first post to see if I missed anything. Try removing the Adobe PDF plugin from your Internet Plugins folder in the main Library (stick it in the disabled plugins folder) - then restart Safari and see if PDFs now work. Also move the PDF Browser Plugin AND the QT plugin to that folder. Some posting on Apple's forums found that fixed things. https://discussions.apple.com/thread/319868...45&tstart=0

If it works after doing that, you'll need to find a different solution for Firefox - I'd suggest the add-on I linked to above. smile.gif Then you should have the ability to view PDFs in all 3 major browsers. smile.gif
Title: Safari does not open .pdf file.
Post by: jchuzi on April 19, 2012, 05:16:51 AM
I had no problem opening that link in Safari. As to the black screen, I seem to recall that you must quit Safari before installing PDF Browser Plugin in order to avoid this behavior. If you have already installed the plugin, quit Safari and relaunch it before trying it again (that works also).
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 19, 2012, 07:21:29 AM
QUOTE
Safari->Help->Installed Plug-ins, what do you see?
Flip4Mac Windows Media Plugin 2.3.8
Java Applet Plug-in
Picasa
QuickTime Plug-in 7.7.1
Shockwave Flash
Speed Download Plugin
None of those indicate any PDF mime-type or file extension capabilities.

First thing this morning, I installed Adobe Reader. Checking its prefs I found a couple of places where it changes the default PDF operations to Reader:
[attachment=2554:Adobe_Re...Snapz002.gif]

As you can see, it is now disabled. It is still inactive, un-clickable, just as it was before I removed the two Adobe Plug-Ins. Removing those plug-Ins was the only way I could find to change the default back to "normal". BTW, I am operating as the Administrator in this account.

I Quit Safari before removing the Plug-Ins and did not check the "Installed Plug-Ins list before doing that. However, before removing them, I was able to view a PDF in Safari. Therefore, I know that plug-in works. After removing them and restarting Safari, I was not able to view that same PDF (just the 'normal' black screen). The list of mime-types and extensions is quite long, perhaps I can get each Plug_in's list in a separate screenshot. dntknw.gif

QUOTE
As to the black screen, I seem to recall that you must quit Safari before installing PDF Browser Plugin in order to avoid this behavior.
Jon, I assume you are talking about the Plug-In that Paddy mentions?
QUOTE
move the PDF Browser Plugin AND the QT plugin to that folder. [Emphasis added]
But I'm confused about even the need to install a PDF Plug-In for Safari, since everyone else claims it can view PDFs without any. dntknw.gif
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 19, 2012, 07:56:47 AM
Plug Ins listing:
[attachment=2555:Plug_In_...Download.gif]
Speed Download Plugin

[attachment=2556:Plug_Ins_Flip4Mac.gif]
Flip4Mac Windows Media Plugin 2.3.8

[attachment=2557:Plug_Ins_Multiple.gif]
Java Applet Plug-in, Picasa, Shockwave Flash

[attachment=2558:Plug_Ins_QT.gif]
QuickTime Plug-in 7.7.1
Title: Safari does not open .pdf file.
Post by: Paddy on April 19, 2012, 08:11:16 AM
Jim, try putting Speed Downloader in the disabled plugins folder. Methinks it's hijacking your PDFs, which is why you don't see them in the browser. It would seem that any plugin overrides the built-in viewer in Safari. (Look at the list of files it handles again - PDF is in there)

BTW - I'm rather confused as to the sequence of events with your Adobe plugin. If it's disabled, it shouldn't be working. If you're using Safari 5.1, it won't work, according to Adobe. http://helpx.adobe.com/x-productkb/multi/s...ble-reader.html
Title: Safari does not open .pdf file.
Post by: jchuzi on April 19, 2012, 08:14:43 AM
QUOTE(Xairbusdriver)
Jon, I assume you are talking about the Plug-In that Paddy mentions?
I specifically meant the PDF Browser Plugin (link provided in my first post in this thread).
Title: Safari does not open .pdf file.
Post by: Paddy on April 19, 2012, 08:17:54 AM
QUOTE(jchuzi @ Apr 19 2012, 06:16 AM) <{POST_SNAPBACK}>
I had no problem opening that link in Safari. As to the black screen, I seem to recall that you must quit Safari before installing PDF Browser Plugin in order to avoid this behavior. If you have already installed the plugin, quit Safari and relaunch it before trying it again (that works also).


Tried that - several times. No dice. It doesn't make the black screen go away. It's possible that something else I have (Glims? Flashblock?) is conflicting with it. The plugin does work - but not until after I click on the screen. Since I don't really need all the extra functionality of that plugin, AND I only installed it for Firefox in the first place and have now found a suitable solution for FF, I'm quite content to go back to letting the built-in viewer do the job. smile.gif
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 19, 2012, 11:08:40 AM
You may be correct...again?! I didn't look closely enough at the SD thing. It's supposed to "handle" downloading anything, but it may also be interfering with even displaying a PDF. Why only that format, I have no idea. It probably has something to do with it being from Adobe! wallbash.gif

BTW, the Adobe PDF viewer worked when it was installed. It didn't work when I removed it. Guess I didn't make that clear. I notice some of the lights in my house work similarly, if I turn the switch ON, they light up. If I turn the switch OFF, they aren't nearly as bright...rather like me! blush-anim-cl.gif

I find it infuriating the way Adobe decides to 'take control' of ones hardware. Simply installing Reader set it as the default PDF viewer, even in Safari. And it even disables the checkbox that would, in any other company's app, allow one to select/deselect that choice. Why even show the checkbox if it is never usable?! rant.gif

I goota work on my late Aunt's estate checking accounts, may be gone for the rest of the day...if you're lucky! wink.gif
Title: Safari does not open .pdf file.
Post by: Paddy on April 19, 2012, 12:25:12 PM
QUOTE(Xairbusdriver @ Apr 19 2012, 12:08 PM) <{POST_SNAPBACK}>
You may be correct...again?! I didn't look closely enough at the SD thing. It's supposed to "handle" downloading anything, but it may also be interfering with even displaying a PDF. Why only that format, I have no idea. It probably has something to do with it being from Adobe! wallbash.gif

BTW, the Adobe PDF viewer worked when it was installed. It didn't work when I removed it. Guess I didn't make that clear. I notice some of the lights in my house work similarly, if I turn the switch ON, they light up. If I turn the switch OFF, they aren't nearly as bright...rather like me! blush-anim-cl.gif

I find it infuriating the way Adobe decides to 'take control' of ones hardware. Simply installing Reader set it as the default PDF viewer, even in Safari. And it even disables the checkbox that would, in any other company's app, allow one to select/deselect that choice. Why even show the checkbox if it is never usable?! rant.gif

I goota work on my late Aunt's estate checking accounts, may be gone for the rest of the day...if you're lucky! wink.gif


So...the Adobe PDF plugin worked on Safari 5.1? Strange...because according to everyone, including Adobe, it doesn't.

Anyway, it's simple enough to see if it's Speed Download causing the problem. Drag it into the disable plugins folder and restart Safari and try a PDF. The easiest one to try: put "W4" in the Google search window - it's the PDF that comes up #1 in the search results. smile.gif
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 19, 2012, 12:28:46 PM
First, I simply disabled/unchecked "PDF" in the list of items Speed Download 'intercepts.' Restarted Safari. BIG CHANGE! Now I get a white page rather than a black one! laughhard.gif

Second, after Quitting Safari, again, I moved the SD Plug-In to a 'Disabled' directory. Restarted Safari. No change. Despite the Status Bar saying that it would open the linked item in a new window or tab, nothing happened except the 'file-being-downloaded' graphic and a new, blank, white page.

But, since this Plug-In is in Library not ~/Library, it may require more than simply Quitting/restarting Safari. I'm going to do a Restart of the OS and see if that makes any difference. Later...

Restarting didn't help, still nothing but a blank, white window with the file being downloaded. Oh well...I've spent more time trying to make this work and losing some capabilities that I'd rather have out of SD. As I say, I prefer to view a PDF in Preview (and I can also delete Reader (again!). wink.gif

Sorry I can't help you jb, at least without using a Plug-In. dntknw.gif
Title: Safari does not open .pdf file.
Post by: jb on April 19, 2012, 01:11:34 PM
Thanks all. I fixed my Safari problem with your various replies and links. Here is what I did.

1- I closed Safari.
2- From Library->Internet Plugins, not having a Disabled Plugins folder, I trashed the following:
   - Adobe PDF plugin
   - PDF Browser plugin
   - QT plugin
3- With Mackeeper's Smart Uninstaller I removed what was left of those plugins after I had trashed them.
4- I  reinstalled PDF Browser Plugin 2.4.4

I can now open my original pdf link with Safari. I guess the original PDF Browser Plugin must have been corrupted. I have not tried to open a QuickTime link. I suspect I will have to
also reinstall the QT plugin, although the Safari Plugin list below shows QT Plugin 7.6.6 as being installed.

Paddy, as I had written in my first message, Firefox was opening the pdf link OK. After making the above "changes" Firefox still opens the link OK.

For your info, here is the list of my Safari plugins taken from the Safari->Help->Installed Plugins:
[attachment=2559:Safari_plugins_1.jpg]

[attachment=2560:Safari_plugins_2.jpg]

[attachment=2561:Safari_plugins_3.jpg]

[attachment=2562:Safari_plugins_4.jpg]

jb
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 19, 2012, 04:16:26 PM
So, do you or do you not need a Plug-In to view PDFs in Safari? I thought one did but was told otherwise earlier. dntknw.gif

Now, I hear, again, that someone is viewing them in Safari, but with not one but two PDF Plug-Ins! wacko.gif Which one is Safari using? Does it matter? I guess one could always remove one and see what difference it makes. rolleyes.gif

Where does download the Webkit Plug-In? Must be somewhere at Apple or the Dev site?

jb, you can create a "Disabled" folder/directory anytime, anywhere you want. You just may have to give your Admin password if it's not in your user/Library.

I'm also confused about what you needed "Mackeeper's Smart Uninstaller" to do to finish uninstalling anything. dntknw.gif What could you not install with command-delete and a password?
Title: Safari does not open .pdf file.
Post by: Paddy on April 19, 2012, 04:51:55 PM
Jim, are you sure your Webkit browser plugin is missing? It should be at the very bottom of the list.

It's not something you can actually uninstall, so I'm a little puzzled as to why it's missing. And you can't download it separately either.

The only other thing you might want to check...just in case the Adobe plugin does weird things:

QUOTE
To display PDFs using the built-in WebKit PDF viewer for Safari, open Adobe Reader (located in /Applications) and select "Preferences" from the "Adobe Reader" menu. Make sure that the option "Display PDF in browser using:" is not checked, then restart Safari. Failing this, navigate to /Library/Internet Plug-Ins (the Library folder at the root level of your hard drive) and remove the file AdobePDFViewer.plugin, then restart Safari.


http://reviews.cnet.com/8301-13727_7-10328402-263.html

If that doesn't work, try the terminal command suggested here: https://discussions.apple.com/thread/227411...=0&tstart=0
Apparently this solved the problem people were having with Safari 4 - worth a shot to see if it works with 5 as well.
In Terminal, enter: defaults write com.apple.Safari WebKitOmitPDFSupport -boolean-neg

Glad you got it working, JB. Though I suspect that you might have found the Webkit browser plugin would have worked if you'd trashed all that stuff (including the PDF Browser Plugin) and restarted Safari. Of course, depending on what you've got installed for FF, you might have lost the ability to view PDFs in that browser. PDF Browser Plugin works for ALL browsers, whereas the Webkit PDF viewer is part of Safari and only works in Safari. It's a bit odd that it's considered a plugin at all, considering you can't remove it.
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 19, 2012, 05:29:17 PM
I may just compress/zip the current Safari and install it from a new download. Thinking.gif I uploaded the Plug-Ins list, not Webkit items seen, even at the bottom of the screen, maybe I should have looked at the back of the page! Groaner.gif

I also mentioned that the Prefs in Reader showed that it had been set to display PDFs; the Display PDF in browser... was checked. But it was also greyed out/deactivated/disabled. Removing the Adobe Plug-Ins and restarting Reader and Safari then showed that checkmark UN-checked but still disabled, which makes sense, since the Plug-Ins were missing. But it made no difference to Safari, even with a Restart of the OS. I did that kind of Restart because all these Plug-Ins are/were in the Library/Internet Plug-Ins directory, not the user/Library/Internet Plug-Ins directory.

I had seen a slightly different defaults write command (defaults write com.apple.Safari WebKitOmitPDFSupport -bool false). But I didn't notice the double-negative! "Omit" with a "negative" value is actually a command to allow the WebKit to display a PDF! What I had done was to change the "falls" value to "true" and I think that actually would tell WebKit to not display a PDF. wallbash.gif I don't think the differences between "boolean" and "bool" nor "neg" and "false" are significant, either. Now that I have absolutely no PDF viewer Plug-In installed, I may try the Terminal method, again. dntknw.gif
Title: Safari does not open .pdf file.
Post by: Xairbusdriver on April 19, 2012, 06:16:33 PM
OK, some useful if tedious and easy to forget information:[indent]According to Terminal, bool[ean] values must be only: true | false | yes | no. So, using "-neg" doesn't work at all. As posted, no space between "-boolean" and "-neg" it sets the 'value to just that, "-boolean-neg" eek2.gif

Inserting a space between them brings up the MAN page listing the possible key words since "neg" is not a valid boolean value.

As expected, "true | yes" sets the value to 1. "false | no" sets it to 0 (zero).

I think I was correct about the double-negative part of this setting; the name of the variable is"...Omit..." and the Terminal command that makes it work set the value to false | no, in human terms, zero. In other words, a value of zero tells WebKit NOT to Omit displaying a PDF. Must have been a bad day for the programmers... dntknw.gif It could just as well have been "WebKitDisplayPDFSupport" with a value of 1 | true | yes! wacko.gif

At any rate, using the "defaults write com.apple.Safari WebKitOmitPDFSupport -bool false" sets the value to zero and allows Safari to display a PDF. You don't even need to Quit/Start Safari! I suspect that Adobe Reader sets that value to 1 when it is installed. Deleting it and even its Plug-Ins doesn't change the value back to zero. Thus the need for the Terminal command. wallbash.gif

Furthermore, the Plug-Ins list now shows the "WebKit built-in PDF" item. I did need to disable PDF in the list of extensions that Speed Download handles/intercepts, however.

So, thanks to all the pushing, shoving, cajoling and a little name-calling of you "guys," I can now display a PDF in all their goryGLORY while in Safari. All without any third-party Plug-Ins! And a right-click still gives me the option to simply download it. blush-anim-cl.gif laughhard.gif
Title: Safari does not open .pdf file.
Post by: Paddy on April 19, 2012, 07:56:10 PM
Interesting. I had noticed the double negative aspect of the command but didn't know that -neg wasn't a valid option. You might want to post this bit of info on the Apple thread, just in case someone else tries all the other solutions and still needs the Terminal command. smile.gif

Anyway - glad it's all working for everyone now. I've learned a bit while following a few hunches (figured that non-working Adobe plugin was bad news, and it was) and I now also have FireFox 11.0 displaying PDFs very nicely without using the the PDF Browser Plugin, which I never did get to behave itself in Safari. As I noted - I have some other potential suspects in that department, none of which I'm willing to forgo, and since I'd only installed the plugin to be able to view PDFs in Firefox it made more sense to find a different solution for Firefox than create a problem in Safari!

In the course of my Googling I found reference to a native PDF browser under development for Firefox. It was available for download last fall, but seems to have disappeared since; the download links no longer work. But then...a little more poking around looking at various things Firefox tonight and I found this: http://iloveubuntu.net/firefox-14-nightly-...ased-pdf-viewer

So - off to play on the bleeding edge and update my version of Nightly to see how that works. smile.gif

Later: I can confirm that it does indeed have a very nice built-in HTML 5 PDF viewer, that has some features that are lacking in Safari's (the ability to jump to a particular page, and it shows the total number of pages in the nav bar) cool.gif

If anyone is interested in Firefox Nightly (now at version 14) it can be downloaded here: http://nightly.mozilla.org/

Title: Safari does not open .pdf file.
Post by: kimmer on April 19, 2012, 08:11:54 PM
Wow. I remember having this problem way back when, but I don't remember what I did to "fix" it. After reading all the comments, I was totally curious about what plug-ins I have, and this is what I found:I view pdf's in Safari all the time with no problems, and I right click a link to download them or "save as" while viewing. Maybe I'm lucky? dntknw.gif

Oh, and I have no idea what "rocketlife" is. I'll have to go look it up. Answer: it's from HP and related to our printer.
Title: Safari does not open .pdf file.
Post by: jchuzi on April 26, 2012, 03:15:05 PM
This Fine Tuned Mac thread has some interesting things about PDFs and Adobe Reader.