Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Browse local PDFs in Safari Web Browsers
Mad that Preview.app is turtle slow with PDFs? Well, I have a fix for you, using Safari. First, install Safari and the PDF browser plugin from schubert-it.com. Now, this will let you see PDFs on the web, but what about ones on your hard drive? Safari doesn't know it can open them. Here's how to teach it...

Right click and show package contents in Safari. Then open Info.plist in TextEdit. Find the first document type (the second overall) and paste this right before it; you're essentially adding a document type key:
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
<string>PDF</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/pdf</string>
</array>
<key>CFBundleTypeName</key>
<string>NSPDFPboardType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>PDF </string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>NSDocumentClass</key>
<string>BrowserDocument</string>
</dict>
Save, run Safari, quit Safari, and then enjoy drag and drop PDFs in Safari.

[Editor's note: I have not tested this one...]
    •    
  • Currently 4.00 / 5
  You rated: 5 / 5 (4 votes cast)
 
[16,128 views]  

Browse local PDFs in Safari | 21 comments | Create New Account
Click here to return to the 'Browse local PDFs in Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Works like a charm!
Authored by: Anonymous on Feb 07, '03 11:07:11AM

I followed the instructions exactly as presented, and it worked flawlessly. Very nice hint!



[ Reply to This | # ]
Works like a charm!
Authored by: maclives on Feb 08, '03 05:54:14AM

What does this mean?

"Find the first document type (the second overall) and paste this right before it"

Makes not a lot of sense. Can't be more explicit? I pasted after the first occurrence of that type of block and I can open pdfs now but dragging pdfs over the dock icon does nothing.

Thanks,

ML



[ Reply to This | # ]
Ditto
Authored by: willbank on Feb 07, '03 11:39:20AM

Genius - you guys are incredible. BTW talking of plugins has anyone found a work-around for the useless video/x-ms-asf-plugin from M'soft as I can't get any streams from a key site without it.

But, back on point, well done agan!



[ Reply to This | # ]
Ditto
Authored by: tinkertank on Jun 07, '04 02:04:56PM

VLC works really well with ASF



[ Reply to This | # ]
Great hint
Authored by: guizard on Feb 07, '03 11:49:23AM

This is a great hint. Now you can only drag a PDF document into a safari window and will open instantly. This is good for reading them but cannot copy its content. It would be great to be able to do so; copy text and images as on Acrobat Reader. But it's great anyways. I tried to move into a Safari window a rtf document and there you can select text, copy and even check the spelling.
Could other docuemnt types be added following the same hint, for example, Word or Excel documents?
Every new hint I find for Safari makes me more and more willing to abandon IE.

Let's hunt and IExplorer in our own SAFARI !



[ Reply to This | # ]
Do you really need to 'teach' Safari?
Authored by: jecwobble on Feb 07, '03 11:51:12AM

I had already installed the PDF plugin. I just dragged and dropped a PDF from my hard drive onto Safari and it opened right up without any of the info.plist edits. Am I missing something?



[ Reply to This | # ]
Another option
Authored by: Dieringer on Feb 07, '03 11:56:54AM

Dragging pdf files to Safari works just fine without going through all this. With the plugin installed, of course.



[ Reply to This | # ]
Another option
Authored by: robg on Feb 07, '03 12:05:06PM

Weird ... it did not work on my machine (and I didn't have the time to test the hint). Not sure why; if I get some time (ha!) this weekend, I'll try it on a couple of other machines and see what happens...

-rob.



[ Reply to This | # ]
little confusion here...
Authored by: acid3d on Feb 07, '03 12:04:45PM

I'm the one who submitted this. The plugin lets you drag PDF's to a safari *window*. The plist editing lets you open them from the file menu and dragging to the safari icon in the dock.



[ Reply to This | # ]
little confusion here...
Authored by: kikjou on Feb 07, '03 12:21:09PM

I did not change any of the .plist you suggested and I can still open a PDF in Safari by dragging it on the Safari Dock icon. All I need to do is hold down command-option (this is the standard for forcing an application to open a file it would normally not).



[ Reply to This | # ]
little confusion here...
Authored by: CaptCosmic on Feb 07, '03 03:22:16PM

Right, but by making the Info.plist modifications, you don't have to *force* Safari to accept it. All you need to do is drag over the icon, and it will liht up indiciating that it is willing to accept it.



[ Reply to This | # ]
little confusion here...
Authored by: aranor on Feb 07, '03 06:12:07PM

kikjou - it is? I've never heard that before!



[ Reply to This | # ]
little confusion here...
Authored by: Accura on Feb 09, '03 09:14:49PM

That is right, i use it all the time, it was a hit here yonks (love that word) ago



[ Reply to This | # ]
awesome!!!
Authored by: beedee on Feb 07, '03 12:07:53PM

Oh that rocks so hard! I have the full version of Acrobat on my computer at work, and that was the default reader. So nothing ticked me off more than waiting for a.) the PDF to download and b.) Acrobat to load up.

This is PERFECT!



[ Reply to This | # ]
awesome!!!
Authored by: prodok on Feb 07, '03 06:12:33PM

Well, kind of, as long as one knows what to expect.

This plug-in can display PDFs in the browser. Period. However, it does not provide the functionality one is used from Acrobat (Reader) (even if only under Classic so far). It is NOT possible to work with forms, for example, and commenting is not possible either. None of the interactive elements will work.

But for simply displaying it is a cool plug-in.



[ Reply to This | # ]
Cant get it to work
Authored by: dogboy on Feb 08, '03 09:31:48AM

The pdf plugin is fine but I can't get the drag over dock icon to work.
I have pasted the text just before the section controlling tiffs. I have also added tabs to line everythng up. If I open the file in plist editor it looks okay.
Maybe someone who got it to work could post the entire plist file in text form, or give me a link to it?



[ Reply to This | # ]
Works like a charm!
Authored by: jezza on Feb 08, '03 11:00:42AM

5 mins, a quick back up copy for comparison et voila PDF in Safari - wicked hint :-)



[ Reply to This | # ]
works with chimera too...
Authored by: englabenny on Feb 09, '03 06:07:19PM

I wasn't really thinking when I read the hint, so I thought it said chimera... so I tried and it worked nice... :D



[ Reply to This | # ]
Browse local PDFs in Safari
Authored by: crex on Feb 17, '03 02:32:17PM

To acid3d or anyone who knows...similar to dogboy, I can't get the "drag over the dock icon" thing to work...I can open from the file menu so I'm wondering if I did the info.plist thing properly....I wasn't sure what the original instructions meant, "find the first document type (second overall)....I put the string in several places and I settled on the first spot at the top right above the css string...it's not a big deal, but I'd like to solve this interesting hint that acid3d intro'd....I've learned some new things through this...thanks



[ Reply to This | # ]
Browse local PDFs in Safari
Authored by: c1572young on Feb 17, '03 10:32:13PM

Re the problem with not working when dragging a .pdf over the Safari icon in the dock -- try logging out or restarting. That fixed the problem for me.



[ Reply to This | # ]
Re: Drag over Dock doesn't work
Authored by: zeb on Feb 18, '03 01:08:27PM
If logging-out or restarting doesn't work, it could be possible that you have two copies of Safari laying around (like if you accidentally didn't replace an older beta with a new one), the Safari icon in the Dock might be an alias for the copy of Safari that you didn't edit... Just a thought.

[ Reply to This | # ]