Very interesting indeed.
I'd tried the following hint...
http://www.macworld.com/weblogs/macosxhints/2006/12/manpages/index.php
pman()
{
man -t “${1}” | open -f -a /Applications/Preview.app/
}
...which allowed me to open man pages into Preview as nicely formatted PDF.
The actual output of the man -t command is postscript, which then gets piped through to the open command resulting in Preview doing a PS to PDF conversion.
It worked flawlessly for a few weeks (I first tried it on Dec 1, 2006), then suddenly I started getting the error stating “File Error Could Not open file” after the conversion had apparently finished.
Out of curiosity, I tried running the following to create myself a temp post script file to try things with…
% man -t man > temp.ps
This resulted in the temp.ps file, which I then tried opening in Preview, only to get a “File Error Could Not open file” error dialog. This occurs AFTER a progress dialog showing preview attempting to convert the .ps to .pdf
What makes it real strange, is that if I open the file in Firefox, which uses the PDF Browser Plugin for PDF display rather than the Preview application, it works. I see the formatted PDF in the browser window.
I have a workable solution again now by using a command line as such, which I've now added as an alias in my ~/.profile
man -t man > ~/tmp/temp.ps; open -a /Applications/Internet\ Tools/Browsers/Firefox.app ~/tmp/temp.ps
Still, I cannot grasp just why Preview suddenly stopped being able to do what it had been doing just fine. I'm hoping in my case, simply replacing the application will solve the issue, as I don't look forward to trying to track down a user account specific issue if it involves creating a new user, and migrating all my data over. Ugh.
G4 800 (Quicksilver) / Powerbook 1.5 GHz Mac OS X (10.4.8)