man -t man > man.ps will export the man page for man in postscript.
How can I export it in PDF?
I have gone through the manuals and learnt about the
-T option but it's a bit unclear to me.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
gropdf exists on your Linux system, you should be able to use
man -Tpdf man >man.pdf
(note the absence of a space between
On an Ubuntu system, it should be enough to install the
groff package to get access to
The option argument to
-T is passed on to
groff will use its
-T option with the same option argument. So, read the
groff manual about
-T for more info.
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