pstoimg --version (return code: 0)
pstoimg (Revision 1.19, perl 5.026000), part of LaTeX2HTML Release V2008. Supported output image format(s): png,gif
pstoimg --help (return code: 0)
[1mNAME[0m pstoimg - Convert a PostScript file to a bitmap image using Ghostscript and the Netpbm utilities [1mSYNOPSIS[0m [1mpstoimg[0m [1m-help[0m | [1m-version[0m [1mpstoimg[0m [ [1m-antialias[0m ] [ [1m-aaliastext[0m ] [ [1m-center[0m [4mnum[0m ] [ [1m-color[0m [4mnum[0m ] [ [1m-crop[0m [4mcode[0m ] [ [1m-debug[0m ] [ [1m-density[0m [4mnum[0m] [ [1m-depth[0m [4mnum[0m ] [ [1m-discard[0m ] [ [1m-flip[0m [4mcode[0m ] [ [1m-geometry[0m [4mX[0mx[4mY[0m ] [ [1m-interlaced[0m ] [ [1m-margins[0m [4mX[0m,[4mY[0m ] [ [1m-multipage[0m ] [ [1m-out[0m [4mfile[0m ] [ [1m-quiet[0m ] [ [1m-rightjustify[0m [4mnum[0m ] [ [1m-scale[0m [4mnum[0m ] [ [1m-tmp[0m [4mpath[0m ] [ [1m-topjustify[0m [[1mx[0m][4mnum[0m ] [ [1m-transparent[0m ] [ [1m-type[0m [4mtype[0m ] [ [1m-shoreup[0m [4mnum[0m[[1md[0m] ] [ [1m-white[0m ] [4mfile[0m [ [4mfile2[0m ... ] [1mOPTIONS[0m The command line options may be abbreviated to the shortest unique prefix. [1m-help[0m Show this help page and exit. [1m-version[0m Show the release and version of pstoimg and exit. [1m-antialias[0m Use Ghostscript's anti-aliasing feature for rendering "softer" images. This applies to lines and edges of polygonal and oval or circular shapes. Only valid if Ghostscript 4.03 or higher is installed. [1m-aaliastext[0m Use Ghostscript's anti-aliasing feature for "smoother" font characters, without the jagged edges. Similar to [1m-antialias[0m for graphic components. Only valid if Ghostscript 4.03 or higher is installed. [1m-center[0m [4mnum[0m Add the appropriate amount of whitespace to the left of the image so that the image appears to be centered in a total width of [4mnum[0m pixels. [1m-crop[0m [4mcode[0m Crop the bitmap from the given directions. [4mcode[0m may be a string of several cropping instructions, which are executed strictly in the given order. Possible values are: [1mh[0m (horizontal, i.e. crop top and bottom), [1mv[0m (vertical), [1mtblr[0m (top, bottom, left, right) and [1ma[0m (all directions). A special case is [1ms[0m: "shave" the image at the bottom, but only if a single line of whitespace exists. [1m-debug[0m Turn on debugging output. This can get rather verbose. Any intermediate files generated are not removed to help debugging. [1m-density[0m [4mnum[0m The density (resolution) in DPI in which to render the bitmap. The default is 72. [1m-depth[0m [4mnum[0m or [1m-color[0m [4mnum[0m Specify the color depth of the bitmap. Legal values are 1 (black & white), 8 (256 colors) and 24 (true color). [1m-discard[0m Delete the input postscript file if the conversion was successful. Setting the environment DISCARD to a true value (as perl sees it) has the same effect. [1m-flip[0m [4mcode[0m Flip all generated output bitmaps. The following codes are recognized: lr (flip left-right), tb (flip top-bottom), xy (flip bottom/left-top/right), r90 and ccw (rotate by 90 degrees counterclockwise), r270 and cw (rotate 90 degrees clockwise) and r180 (rotate 180 degrees). [1m-geometry[0m [4mX[0mx[4mY[0m Render only this "window" of the PostScript file. If given, this option can dramatically reduce memory requirements and speed up conversion. The geometry is automatically detected in case of EPS files (Encapsulated PostScript). [1m-interlaced[0m Generate an interlaced bitmap. Interlaced images build up from coarse to fine as they are loaded. This option may not work on every installation and/or bitmap type, depending of the capabilities of external programs. [1m-margins[0m [4mX[0m,[4mY[0m The offset of the rectangle in the postscript file that is going to be rendered from top/left. Can be used together with [1m-geometry[0m to further reduce the size of the intermediate bitmap file generated by Ghostscript. [1m-multipage[0m Process a multi-page PostScript file, i.e. create an individual bitmap for every page. The resulting files are numbered: The decimal number (starting with 1) is appended to the basename of the PostScript input file (or the basename of the filename specified with [1m-out[0m), while keeping the extension. [1m-out[0m [4mfile[0m The file where to write the bitmap. If multiple PostScript files are supplied on the command line, this option is ignored. The bitmap type extension is appended automatically if [4mfile[0m does not contain a dot. In connection with [1m-multipage[0m [4mfile[0m is extended by the page number as shown in this example: -outfile foo.gif --------> foo1.gif, foo2.gif, ... [1m-quiet[0m Do not print anything except error messages. [1m-rightjustify[0m [4mnum[0m Add the appropriate amount of whitespace to the left of the image so that it appears to be aligned to the right in a total width of [4mnum[0m pixels. [1m-scale[0m [4mfactor[0m Scale the image by [4mfactor[0m. Valid choices are any numbers greater than zero. Useful choices are numbers between 0.1 - 5. Large numbers may generate very large intermediate files and will take longer to process. If this option is omitted, the environment SCALE is considered. [1m-shoreup[0m [4mnum[0m[[1md[0m] Make height and width of the bitmap(s) an exact multiple of [4mnum[0m. If [4mnum[0m is followed by a "d", then half the extra vertical space is placed underneath. This option is useful, if you want to have "blown-up" images of high quality for print, but downscale them in HTML using "<IMG WIDTH=x HEIGHT=y>". If the actual image is is not an integer multiple of x,y then browsers tend to display distorted images. [1m-tmp[0m [4mpath[0m Use [4mpath[0m to store temporary files. Defaults to /tmp on this installation. This parameter can be set by the environment [1mTMP[0m or [1mTEMP[0m, too. [1m-topjustify[0m [[1mx[0m][4mnum[0m Add padding whitespace to the image so that it gets a defined height. If an integer value is given, it defines the total height. The whitespace is added at the bottom. If the number is preceded by "x", then this multiple of the image height is added as whitespace at the bottom. [1m-transparent[0m Generate transparent bitmaps, i.e. the background color (white) is transparent if viewed with certain viewers (e.g. browsers). This option may not be available due to missing capabilities of external programs. [1m-type[0m [4mtype[0m Instruct pstoimg to render the bitmap in [4mtype[0m format. Depending on the local installation, pstoimg is capable of generating either GIF or PNG bitmaps. This site features the following types: png gif If omitted, the first type in this list is taken. [1m-white[0m Remove TeX's page color information from the PostScript file before converting so that a white background is used. [1mDESCRIPTION[0m [1mpstoimg[0m iterates over the given input files and runs them through Ghostscript. The resulting pnm (portable anymap files) are processed with different Netpbm tools (cropping, color mapping, aligning, ...) and finally converted into (currently) either GIF or PNG format. The bitmaps can now be included e.g. in WWW pages. The PostScript file is converted as is. If a valid bounding box is found (EPS format), then only this area is converted. The image is [4mnot[0m cropped by default. [1mRETURN VALUE[0m 0 if everything went all right x (x != 0) something went wrong. See the message output. [1mEXAMPLES[0m "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. [1mENVIRONMENT[0m DENSITY, DEPTH, DEBUG, DISCARD See [1m-density[0m, [1m-depth[0m, [1m-debug[0m, [1m-discard[0m, 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 "/usr/share/latex2html" on this installation. OUTFILE Setting this has the same effect as specifying [1m-out[0m. 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 [1m-scale[0m. TMP and TEMP Unless overridden by [1m-tmp[0m, these variables denote a directory where to store temporary files. TMP is considered first, then TEMP. [1mSEE ALSO[0m gs, pnmcrop, pnmquant, pbmmake, pnmcat, pnmfile, pnmflip, ppmtogif, pnmtopng, giftool, giftrans. [1mNOTES[0m 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. [1mCAVEATS[0m 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. [1mBUGS[0m 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 email@example.com, 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. [1mAUTHOR[0m Marek Rouchal <firstname.lastname@example.org> [1mHISTORY[0m This script went through a long evolution, beginning with a modification of Doug Crabill's <email@example.com> ps2epsi script. The first perl version was done by Nikos Drakos <firstname.lastname@example.org>. It was gradually improved by numerous LaTeX2HTML developers: Ross Moore <email@example.com>, Jens Lippmann <firstname.lastname@example.org> and others (sorry for not mentioning everyone and thanks for your contributions).