EXAMPLES

pstoimg foo.ps
Convert the first page of foo.ps to the default bitmap type.

pstoimg -type png -crop a -trans -interlace foo.ps
Same as above, but force png output and crop all the whitespace around the image and make the color white transparent and generate an interlaced bitmap.

pstoimg -multi -out bar -type gif -crop a foo.ps
Consider foo.ps a multiple page PostScript file and create output files bar1.gif, bar2.gif, etc.


ENVIRONMENT

DENSITY, DEPTH, DEBUG, DISCARD
See -density, -depth, -debug, -discard, respectively.

GS_LIB
This variable is set to the path(s) where Ghostscript libraries have been found on this system during configuration, but only if the built-in paths are not correct. This fixes the problem of relocation that is quite common on Win32 installations. This behavior can be overridden by setting GS_LIB manually before starting pstoimg.

LATEX2HTMLDIR
The directory where the LaTeX2HTML library and perl modules are found. Defaults to ``d:\\Local\\TeXLive\\l2h'' on this installation.

OUTFILE
Setting this has the same effect as specifying -out. Please do not rely on this feature any more, it will disappear from the next releases!

PAPERSIZE
The papersize to use by Ghostscript to render the image. pstoimg tries hard to optimize for rendering on the smallest possible bitmap size. Still this option is there to enable tuning by hand, although it is deprecated. If pstoimg finds a better setting, this parameter is ignored.

SCALE
See the discussion of -scale.

TMP and TEMP
Unless overridden by -tmp, these variables denote a directory where to store temporary files. TMP is considered first, then TEMP.


SEE ALSO

gs, pnmcrop, pnmquant, pbmmake, pnmcat, pnmfile, pnmflip, ppmtogif, pnmtopng, giftool, giftrans.


NOTES

Several people have suggested to use ImageMagick's convert instead of pstoimg. A few comments on this: convert uses (of course) Ghostscript for conversion of PostScript to bitmap, so one still needs gs. And for the special requirements of LaTeX2HTML convert's features are not sufficient. The ImageMagick toolset has everything in place, but it has some overhead that can prove killing when processing some 100 images. pstoimg only does what it really has to, so it should be quite efficient. Don't get me wrong - I like ImageMagick, but not in the context of LaTeX2HTML.


CAVEATS

This utility is automatically configured and built to work on the local setup. If this setup changes (e.g. some of the external commands are moved), the script has be be reconfigured.

Despite the portability of perl, a pstoimg configured on UNIX will probably not work on Win32 and vice versa.


BUGS

This is a major enhancement release, so there may be a few bugs. As the user inteface changed a bit, some of your tools that were using pstoimg may not work any more.

Please report bugs to latex2html@tug.org, stating the (debug) output of pstoimg, your perl version and the versions of the external tools. Best is to include the cfgcache.pm file from the configuration procedure.


AUTHOR

Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de>


HISTORY

This script went through a long evolution, beginning with a modification of Doug Crabill's <dgc@cs.purdue.edu> ps2epsi script. The first perl version was done by Nikos Drakos <nikos@cbl.leeds.ac.uk>. It was gradually improved by numerous LaTeX2HTML developers: Ross Moore <ross@mpce.mq.edu.au>, Jens Lippmann <lippmann@rbg.informatik.tu-darmstadt.de> and others (sorry for not mentioning everyone and thanks for your contributions).