A function to output a man page as a pdf file

A function to output a man page as a pdf file: "$ function man2pdf(){ man -t ${1:?Specify man as arg} | ps2pdf -dCompatibility=1.3 - - > ${1}.pdf; }

Tested on Fedora 12. This function will take a man page and convert it to pdf, saving the output to the current working directory. In Gnome, you can then view the output with 'gnome-open file.pdf', or your favorite pdf viewer.



commandlinefu.com


by David Winterbottom (codeinthehole.com)

"