Export a man page in pdf
If groff
and gropdf
exists on your Linux system, you should be able to use
man -Tpdf man >man.pdf
(note the absence of a space between -T
and pdf
)
On an Ubuntu system, it should be enough to install the groff
package to get access to gropdf
.
The option argument to -T
is passed on to groff
and groff
will use its -T
option with the same option argument. So, read the groff
manual about -T
for more info.
On systems using mandoc
, the groff
utility does not need to be installed for the above command to work since the mandoc
utility (called by man
) would convert the manual to PDF by itself.
Make sure you have ghostscript
package installed:
sudo apt-get install ghostscript
You would need to convert the postscript to the PDF; for the command last
that would be:
man -t last | ps2pdf - last.pdf