-->

Previous | Table of Contents | Next

Page 434

AUTHOR

Copyright" 1989 by Jef Poskanzer.

2 August 1989

pstopnm

pstopnm—Convert a PostScript file into a portable anymap

SYNOPSIS


pstopnm [_forceplain][_help][_llx s][_lly s][_landscape][_portrait][_nocrop]

[_pbm |_pgm |_ppm][_urx s][_ury s][_verbose][_xborder n][_xmax n][_xsize f]

[_yborder f][_ymax n][_ysize n] psfile[.ps]

DESCRIPTION

pstopnm reads a PostScript file as input and produces portable anymap files as output. This program is just a useful shell script that runs GhostScript to render a PostScript into one or more pnm files. pstopnm will create as many files as the number of pages in the PostScript document. If the input file is named psfile.ps, the name of the files will be psfile001.ppm, psfile002.ppm, and so on.

The program maps a rectangular portion of the PostScript document into an image file according to the command-line options. The selected area will always be centered in the output file, and may have borders around it. The image area to be extracted from the PostScript file and rendered into a portable anymap is defined by four numbers, the lower-left corner and the upper-right corner x and y coordinates. These coordinates are usually specified by the BoundingBox comment in the PostScript file header, but they can be overridden by the user by specifying one or more of the following flags: _llx, _lly, _urx, and _ury. The presence and thickness of a border to be left around the image area is controlled by the use of the flags _xborder and _yborder. If BoundingBox parameters are not found, and image area coordinates are not specified on the command line, default values are used. Unless both output file width and height are specified via the _xsize and _ysize flags, the program will map the document into the output image by preserving its aspect ratio.

OPTIONS

_forceplain Forces the output file to be a plain (in other words, not "raw") portable anymap.
_help Prints the command syntax.
_llx bx Selects bx as the lower left corner x coordinate (in inches).
_lly by Selects by as the lower left corner y coordinate (in inches).
_landscape Renders the image in landscape mode.
_portrait Renders the image in portrait mode.
_nocrop Does not crop the output image dimensions to match the PostScript image area dimensions.
_pbm _pgm _ppm Selects the format of the output file. By default, all files are rendered as portable pixmaps (ppm format).
_urx tx Selects tx as the upper-right corner x coordinate (in inches).
_ury ty Selects ty as the upper-right corner y coordinate (in inches).
_verbose Prints processing information to stdout.
_xborder frac Specifies that the border width along the Y axis should be frac times the document width as specified by the bounding box comment in the PostScript file header. The default value is 0.1.
_xmax xs Specifies that the maximum output image width should have a size less or equal to xs pixels (default: 612).
_xsize xs Specifies that the output image width must be exactly xs pixels.
_yborder frac Specifies that the border width along the X axis should be frac times the document width as specified by the bounding box comment in the PostScript file header. The default value is 0.1.
_ymax ys Specifies that the maximum output image height should have a size less or equal to ys pixels (default: 792).
_ysize ys Specifies that the output image height must be exactly ys pixels.

Previous | Table of Contents | Next