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.
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.
On systems using
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.