HOWTO Create a Readable PostScript or Pdf File out of a Man Page

I find myself often reading man pages of unix programs to be able to use the installed software more efficiently. That is one of the reasons I prefer to use a lightweight installation of "real" distribution instead of some tiny distributions that leave all the unncessary files like documentation out of the system to save some megabytes.

The standard output of man is unfortunately not very pleasant to read. But as man pages are written in a typesetting language called groff and processed through the groff engine, the same source can be used to produce a highly readable PostScript file. All you need to do is to use man with the following options instead of the ordinary man command:

man -Tps man > man.ps

This produces a PostScript file man.ps out of the man page for man. You can either use your favourite viewer for viewing the PostScript file, print it out to a printer, or convert it with ps2pdf to a pdf file, if you prefer a pdf.

ps2pdf man.ps

The following screenshot shows man page man as a pdf file, viewed with xpdf.

No comments: