PDA

View Full Version : using ps2pdf



biggsk
30th July 2008, 02:13 AM
Does anyone know the syntax to convert a man page into a pdf using ps2pdf??
I used to know, and cant remember....

Thanks

RupertPupkin
30th July 2008, 03:09 AM
Here's how you'd create a PDF from the man page for the 'less' command:

zcat /usr/share/man/man1/less.1.gz | groff -T ps -man - | ps2pdf - less.pdf
Then open less.pdf in a PDF viewer.

RupertPupkin
30th July 2008, 03:40 AM
Even easier, the first two commands in the pipe can be combined:

man -t less | ps2pdf - less.pdf

biggsk
30th July 2008, 08:25 PM
That worked! Thanks!