home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
NETWORK
/
netpbm_docs.lzh
/
NETPBM
/
DOCS
/
pstopnm.1
< prev
next >
Wrap
Text File
|
1996-11-18
|
6KB
|
242 lines
.TH pstopnm 1 "28 December 92"
.IX pstopnm
.SH NAME
pstopnm - convert a PostScript file into a portable anymap
.SH SYNOPSIS
.B pstopnm
.RB [ \-forceplain ]
.RB [ \-help ]
.RB [ \-llx
.IR s ]
.RB [ \-lly
.IR s ]
.RB [ \-landscape ]
.RB [ \-portrait ]
.RB [ \-nocrop ]
.RB [ \-pbm
.RB | \-pgm
.RB | \-ppm ]
.RB [ \-urx
.IR s ]
.RB [ \-ury
.IR s ]
.RB [ \-verbose ]
.RB [ \-xborder
.IR n ]
.RB [ \-xmax
.IR n ]
.RB [ \-xsize
.IR f ]
.RB [ \-yborder
.IR f ]
.RB [ \-ymax
.IR n ]
.RB [ \-ysize
.IR n ]
psfile[.ps]
.SH DESCRIPTION
Reads a PostScript file as input.
.IX PostScript
Produces portable anymap files as output.
This program is just a useful shell script that runs
.I GhostScript
to render a PostScript into one or more pnm files.
.I Pstopnm
will create as many files as the number of pages in
the Postscript document. If the input file is named
.IR psfile.ps ,
the name of the files will be
.IR psfile001.ppm ,
.IR psfile002.ppm ,
etc.
.PP
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:
.BR \-llx ,
.BR \-lly ,
.BR \-urx ,
and
.BR \-ury .
The presence and thickness of a border to be left around the image
area is controlled by the use of the flags
.B \-xborder
and
.BR \-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
.B \-xsize
and
.B \-ysize
flags, the program will map the document into the output image
by preserving its aspect ratio.
.SH OPTIONS
.PP
.B \-forceplain
.RS
forces the output file to be a plain (i.e. not "raw") portable anymap.
.RE
.PP
.B \-help
.RS
prints the command syntax.
.RE
.PP
.B \-llx
.I bx
.RS
selects
.I bx
as the lower left corner x coordinate (in inches).
.RE
.PP
.B \-lly
.I by
.RS
selects
.I by
as the lower left corner y coordinate (in inches).
.RE
.PP
.B \-landscape
.RS
renders the image in landscape mode.
.RE
.PP
.B \-portrait
.RS
renders the image in portrait mode.
.RE
.PP
.B \-nocrop
.RS
does not crop the output image dimensions to match the PostScript
image area dimensions.
.RE
.PP
.B \-pbm \-pgm \-ppm
.RS
selects the format of the output file. By default, all files are
rendered as portable pixmaps (ppm format).
.RE
.PP
.B \-urx
.I tx
.RS
selects
.I tx
as the upper right corner x coordinate (in inches).
.RE
.PP
.B \-ury
.I ty
.RS
selects
.I ty
as the upper right corner y coordinate (in inches).
.RE
.PP
.B \-verbose
.RS
prints processing information to stdout.
.RE
.PP
.B \-xborder
.I frac
.RS
specifies that the border width along the Y axis should be
.I frac
times the document width as specified by the bounding box comment in
the PostScript file header. The default value is 0.1.
.RE
.PP
.B \-xmax
.I xs
.RS
specifies that the maximum output image width should have a size less
or equal to
.IR xs
pixels (default: 612).
.RE
.PP
.B \-xsize
.I xs
.RS
specifies that the output image width must be exactly
.I xs
pixels.
.RE
.PP
.B \-yborder
.I frac
.RS
specifies that the border width along the X axis should be
.I frac
times the document width as specified by the bounding box comment in
the PostScript file header. The default value is 0.1.
.RE
.PP
.B \-ymax
.I ys
.RS
specifies that the maximum output image height should have a size less
or equal to
.IR ys
pixels (default: 792).
.RE
.PP
.B \-ysize
.I ys
.RS
specifies that the output image height must be exactly
.I ys
pixels.
.RE
.SH BUGS
The program will produce incorrect results with PostScript files that
initialize the current transformation matrix. In these cases, page
translation and rotation will not have any effect. To render these
files, probably the best bet is to use the following flags:
.PP
\ \ \ pstopnm -xborder 0 -yborder 0 -portrait -nocrop file.ps
.PP
Additional flags may be needed if the document is supposed to be
rendered on a medium different from letter-size paper.
.SH SEE ALSO
gs(l), pstofits(l)
.SH COPYRIGHT
Copyright (c) 1992 Smithsonian Astrophysical Observatory
.br
PostScript is a Trademark of Adobe Systems Incorporated.
.\" Permission to use, copy, modify, distribute, and sell this
.\" software and its documentation for any purpose is hereby
.\" granted without fee, provided that the above copyright
.\" notice appear in all copies and that both that copyright
.\" notice and this permission notice appear in supporting documentation,
.\" and that the name of the Smithsonian Astrophysical
.\" Observatory not be used in advertising or publicity
.\" pertaining to distribution of the software without specific,
.\" written prior permission. The Smithsonian Astrophysical
.\" Observatory makes no representations about the suitability
.\" of this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\" THE SMITHSONIAN ASTROPHYSICAL OBSERVATORY DISCLAIMS ALL
.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\" EVENT SHALL THE SMITHSONIAN ASTROPHYSICAL OBSERVATORY BE
.\" LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
.\" OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
.\" THE USE OR PERFORMANCE OF THIS SOFTWARE.
.SH AUTHOR
Alberto Accomazzi, WIPL, Center for Astrophysics.