Re: Man pages to PDF or RTF?
On Sat, 17 Nov 2001, Rafe B. wrote:
>
> Hi. Nother newbie windoze-user question.
>
> I know this has been asked before, apologies
> and thanks in advance.
>
> Is there a windoze util that will convert
> Linux man pages to RTF or PDF or Postscript?
>
> Specifically, what is the format of man pages?
> TeX/roff /troff/other ??? Is there a
> HOWTO for man-page format (There must also
> be a nifty indexing scheme, right?)
>
> I really want printable files. I know I can
> find the man pages in HTML format at many
> different websites -- that's not the point.
>
> Furthermore, I'd prefer to be printing the
> man pages that live on my own debian installation,
> not some generic page off the web.
I can't think of a good way of doing this in Windows, unless you
have CygWin and GhostScript installed there.
What I =think= you can do, is something like this...
Go to a directory on your GNU/Linux machine, where you want to place
your PDFs, say /home/rafe/manpages
$ mkdir /home/rafe/manpages
$ cd /home/rafe/manpages
Then, copy your man directory over, so that you can work with them.
$ cp --recursive /usr/share/man/* .
$ cp --recursive /usr/local/man/* .
Now, you have a mirror of your manpages. Run through them and write out
your PDFs. (I am using a bash script to do this, convert to your
favourite shell.)
$ for i in `find .` ; do man -T -l $i | ps2pdf - > $i.pdf ; done
After this, you can delete your duplicate manpages, leaving only your
PDFs.
$ find . -name *.gz -exec rm -f '{}' ';'
Now, for this to work, you will need groff, gs, and man-db installed.
Good luck!
Simon
Reply to: