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

Add PDF icon definitions to Safari Web Browsers
I recently read this hint which explains how to get Safari to recognize PDF files stored on your local drive. I now use Safari as my default PDF viewer, however if you set a PDF to open with Safari by default, the PDF icon will be the generic document icon because Safari doesn't include an icon for PDFs. Here's how to get a nice icon instead...

First you need to make a nice icon. Control-click on Safari and select "Show Package Contents". In the Resources folder you will find "document.icns" which is the icon file used for HTML documents. Duplicate this file and call it something like "pdfDocument.icns", open it in an icon editor like Iconographer and add the text "PDF" to it (or get as creative as you like). Alternatively, you could simply copy an existing PDF icon file to the Resources folder. Whatever you do, just make sure your new icon file is in the Resources folder. Now that you have the icon file, all you have to do is tell Safari to use it. Open the "info.plist" document (in the Contents folder) and find the PDF document type key you added (described in the hint referenced above). Within this key is the key which defines the PDF extensions:
Place the following just below it:
Just make sure that the name between the "string" tags matches the name of your PDF icon file. Now when you change a PDF to open with Safari, it should use the icon file you specified. I think you might need to log out for the changes to be recognized by the system.
  • Currently 2.00 / 5
  You rated: 4 / 5 (5 votes cast)

Add PDF icon definitions to Safari | 4 comments | Create New Account
Click here to return to the 'Add PDF icon definitions to Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Can do, but why?
Authored by: WaltFrench on Feb 14, '03 09:26:53AM

Dunno if it's kool or not, but why would somebody want to lose Acrobat's various features that are tuned to viewing PDF's? Like side-by-side pages and other layout-aware formats, easy zooming, bookmark/thumbnail smarts, ... ?

I never did like Swiss Army Knives -- big hunks of metal in your pocket, but the corkscrew is more likely to shred the cork than help you enjoy a nice sip. Ditto for the idea that a good piece of software ought to do everything in one place. Once upon a time Apple had a vision for user-designed inter-operability, but it's dead. Turning the light-on-its-feet Safari into Bloatware that Wants to Do Everything Poorly seems like a travesty.

C'mon Apple: bring back the USER's ability to link together first-class functionality, rather than force us to choose a "home base" app that we kludge to do all our work in, because it's too painful to be swapping between various apps.

[ Reply to This | # ]
Can do, but why?
Authored by: Spartacus on Feb 14, '03 10:57:50AM

FYI, the official Swiss Army Knife has no corkscrew.

Do you know anybody who put a Swiss Army Knife in your pocket without asking? I'd be interested.

[ Reply to This | # ]
Re: Can do, but why?
Authored by: ChuckEye on Feb 15, '03 09:57:01PM

As far as I know, PDF rendering is built into the Quartz engine. That's why Preview, a 1.6 MB app, can render them, and Safari too. So it's not really bloatware if the functionality is system-wide, and not an inflated app.

Then again, Jamie Zawinski's Law of Software Development states ``Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.''

[ Reply to This | # ]
Re: Can do, but why?
Authored by: red30 on Feb 17, '03 07:02:46AM

let's see here, on my system, Safari comes in at ~7 MB. Acrobat Reader, on the other hand, tips the scales at 77.4 MB (wait, that can't be right... ...holy sh**, Acrobat READER is 77 MB, and I'm not even talking about the full Acrobat). Now that's B L O A T W A R E. Thanks, but anything that takes 77 MB, and is that slow, I'm gonna replace with Safari. Good tip, thanks.

[ Reply to This | # ]