groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Using pic/groff/gs to produce gif/jpeg


From: Ralph Corderoy
Subject: Re: [Groff] Using pic/groff/gs to produce gif/jpeg
Date: Wed, 11 May 2005 15:01:20 +0100

Hi Larry,

> I've never found a good way to script this.  The process I use is to
> open the postscript file with gimp, crop and save.  It would be very
> pleasant to have a way to quickly generate high quality cropped images
> from groff.  If anyone knows how to do that I'd like to know too.

For troff.org, where I want the images to be generated from the given
troff source, I use

    groff "$@" |
    gs -q -r144 \
        -sDEVICE=pnmraw -sPAPERSIZE=a4 -sOutputFile=- \
        -dTextAlphaBits=4 -dGraphicsAlphaBits=4 - |
    pnmcrop -quiet |
    pnmmargin -white 10 |
    pnmtopng -quiet -interlace -compression 9

netpbm does the hard work with pnmcrop and pnmmargin.

Cheers,


Ralph.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]