printing man pages and source code (with vgrind + troff)

Erik Trulsson ertr1013 at student.uu.se
Thu Jun 5 11:22:16 PDT 2003


On Thu, Jun 05, 2003 at 07:57:51PM +0200, Joan Picanyol i Puig wrote:
> Hi,
> 
> I need to print many man pages and source code files, and I need the
> output to be in pdf and preferably with two pages per side (syntax
> colouring would be amazing:). So I've been looking at vgrind (+ ps2pdf?)
> for the source code, but I can't get what I want. As for the man pages,
> the semman2html
> 
> Can someone tell me what the one-liner for this is?

I would suggest using a2ps, and then pdf2ps to convert the postscript
file to PDF. a2ps can convert most types of textfiles into nice-looking
postscript. 

The one-liner would look something like:

a2ps -2 -o - /path/to/input/file | ps2pdf - outputfile.pdf

There are lots of flags you can give to a2ps to control the exact look
of the output.  Read the documentation if necessary.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-questions mailing list