Extensions are not enough

Another thing I like about Mac OS X is [the print preview available in any software][printing] that chooses to provide printing (unless that software [chooses to be awkward][acrobat]).

Acrobat dialog box being unhelpful as ever

Best software ever

When this feature first appeared, one could trigger a stupid bug if one happened to have an application other than Preview.app set as the default application for files with the `.pdf` extension. If you had Adobe Acrobat set as your default PDF viewer, then hitting the preview button in print dialog boxes would open that preview in Acrobat.

It was a stupid bug, particularly because it was so obvious what was going wrong. The preview was being written to a temporary file with a `.pdf` extension and then being opened using whatever handler was defined in launch services. But you don’t want that, you want it to be handled by the operating system and not be subject to whether or not you have the patience to wait thirty seconds while Acrobat version 6 merrily paints its splash screen for your pleasure.

Later versions of Mac OS X fixed this so that the print preview is *always* displayed using Preview.app. This happens even if you set Acrobat as the default application for `.pdf` files, and it is a good thing it behaves like this. (In fairness, launch times for Acrobat since version 8 are no longer painful.)

*I tested what happens if you delete Preview.app on a clean 10.5.8 install: the system falls back to opening QuickTime Player.app for displaying previews (which works fine). And if you delete QuickTime Player.app it falls back to using Safari.app (also works fine). And if you delete Safari.app it falls back to TextEdit.app (which works fine as long as you can render raw PDF data in your head).*

It is as if going by the default association between file extension and application was not enough; that the system had a need to use a particular bit of software for these PDF preview files, regardless of what software was chosen as the handler for a different set of PDF files. Who’d have guessed?

All of this is an argument for providing a **programmatic** way to set the owning application for a file. You might call this a creator code, potentially any file could have one, but no biggie if it was not present because you could fall back to some regular stupid heuristic for determining the owner.

And then in Mac OS X 10.6 you might [change the behaviour of the system][106] so that [this useful and important information about the file is ignored][ars]. Grumble.

Dammit, only just occurred to me to see whether the system would eventually fall back to using Acrobat itself for displaying previews. Grumble.

[printing]: http://support.apple.com/kb/HT3771
[acrobat]: http://www.adobe.com/products/acrobatpro/
[ars]: http://arstechnica.com/staff/fatbits/2009/09/metadata-madness.ars
[106]: http://db.tidbits.com/article/10537

Leave a Reply

Your email address will not be published. Required fields are marked *