It’s fairly easy:
$ man -t bash | ps2pdf - bash.pdf

“man -t” uses groff -mandoc to format the manual page to stdout.

“ps2pdf – bash.pdf” means the input is from stdin and output to bash.pdf.

We use a simple pipe to join the stdout of “man” and stdin of “ps2pdf”.

That’s it!

2 Responses to “Convert man page to PDF”


  1. […] This post was mentioned on Twitter by Planet Ubuntu, Ubuntu World Wide, Nobuto MURATA, Planet Fedora, Arjan Waardenburg and others. Arjan Waardenburg said: Aron Xu: Convert man page to PDF: It’s fairly easy:$ man -t bash | ps2pdf – bash.pdf “man -t” uses groff -mandoc t… http://bit.ly/d02ys1 […]


  2. […] 参考:http://blogs.gnome.org/happyaron/2010/09/13/convert-man-page-to-pdf/ 2010年09月13日 | freetstar | No Comments » […]


Comments are closed.