O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  

Making PDF man Manuals from the command line
There's a new feature in Panther that allows you to turn postscript files into PDFs at the command line, and it works great with man files.

Contributed by:
Tom Bridge
[10/31/03 | Discuss (2) | Link to this hack]

While man files are incredibly useful, they're often a bear to print or take with you. In Panther, there's a new command at the terminal, pstopdf. It takes plain postscript output and returns a pdf file. Better yet, you can pipe things to it from the Terminal. To take a manual with you as a PDF, or to print it later when you have a printer available.

Structured like this: [apollo:~] tbridge% man -t grep | pstopdf -i -o grep.pdf

The t flag on the man command outputs the manual in postscript format allowing us to use it as standard out for the pstopdf command. The pstopdf command requires the i flag to use standard input, and the o flag allows us to name the output, which will reside in the home folder of the user running the command. Tom Bridge MacSlash

See also: man pstopdf
man man

O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.