How can I print man pages without losing the formatting? Updated: 04/07/01

To get the italic and bold fonts from the man file on a LaserJet:

$ zcat manfile.1 | nroff -man -Tlj | lp ...

On a PostScript printer (you'll need GNU groff):

$ zcat manfile.1 | groff -man -Tps | lp ...

If your man file is a complex one including tables, pipe it through 'tbl'
before piping it through 'nroff'.

Some man pages like ioctl(2) may need the HP macros:

$ zcat manfile.1 | groff -t -e -C -M/usr/lib/tmac -man -Tps | lp ...

Note, on man files that are not compressed, use cat in place of zcat.


5.9.5 How can I view and print Postscript (.ps) files?
Added: 07/08/02

To view PostScript files, install the GhostScript package as well as the
GhostView (gv) package. Then you can use gv (an X app) to display .ps

To print PostScript (.ps) files, it is necessary to have a
PostScript-compatible printer.

If you do have a PostScript printer, simply use the 'lp' command as

$ lp

If you do not, there are public domain programs, for example,
that can convert PostScript to other printer languages such as PCL.
Suggest a Site