Print a Man Page
Reading a man page using a terminal application is easy, but I doubt if it would ever win a convenience award. Sometimes, it is necessary to print the man page. I can recommend two ways of doing this.
First, using the -t switch, when launching the man command from a terminal, causes the man page to be formatted in Postscript. Technically, it uses groff to perform the conversion. More information about this can be found within the man command’s manual page (man 1 man).
The Postscript output can be piped to lpr for printing in a CUPS printer. The following example prints the iptables manual page to the HP690C printer:
$ man -t iptables | lpr -P HP690C
Alternatively, the output can be saved to a postscript file:
$ man -t iptables > iptables.ps
More on using a CUPS printer from the CLI can be found here.
Those who have the Yelp GNOME application installed, can take advantage of its internal man page parser and HTML converter. For example, in order to display the iptables man page in Yelp, launch it like the following:
$ yelp man:iptables
From there, you can use the GNOME print dialog to print the iptables manual.
I tend to prefer the quality of the man page when it has been printed through Yelp.
