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.
_______________________________________________
Groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff