version 2 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
pstopnm |
|
|
2 |
!!!pstopnm |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
BUGS |
|
|
8 |
SEE ALSO |
|
|
9 |
COPYRIGHT |
|
|
10 |
AUTHOR |
|
|
11 |
---- |
|
|
12 |
!!NAME |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
pstopnm - convert a !PostScript file into a portable anymap |
|
|
16 |
!!SYNOPSIS |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
__pstopnm__ [[__-stdout__] [[__-forceplain__] |
|
|
20 |
[[__-help__] [[__-llx__ ''s''] [[__-lly__ ''s''] |
|
|
21 |
[[__-landscape__] [[__-portrait__] [[__-nocrop__] |
|
|
22 |
[[__-pbm__ |__-pgm__ |__-ppm__] [[__-urx__ |
|
|
23 |
''s''] [[__-ury__ ''s''] [[__-verbose__] |
|
|
24 |
[[__-xborder__ ''n''] [[__-xmax__ ''n''] |
|
|
25 |
[[__-xsize__ ''f''] [[__-yborder__ ''f''] |
|
|
26 |
[[__-ymax__ ''n''] [[__-ysize__ ''n''] |
|
|
27 |
''psfile''[[__.ps__] |
|
|
28 |
!!DESCRIPTION |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
Reads a !PostScript file as input. Produces PBM, PGM, or PPM |
|
|
32 |
files as output. This program simply uses __!GhostScript__ |
|
|
33 |
to render a !PostScript file with its PNM device drivers. If |
|
|
34 |
you don't have __!GhostScript__ installed (invoked by a |
|
|
35 |
__gs__ command), or the version you have installed was |
|
|
36 |
not built with the relevant PNM device drivers, |
|
|
37 |
__pstopnm__ will fail. You can see if you have the proper |
|
|
38 |
environment by issuing the command __gs --help__ . If it |
|
|
39 |
responds and lists under |
|
|
40 |
__pbm__, __pbmraw__, __pgm__, __pgmraw__, |
|
|
41 |
__pnm__, __pnmraw__, __ppm__, or __ppmraw__, |
|
|
42 |
you're in business. |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
__pstopnm__ does not use the Netpbm libraries to generate |
|
|
46 |
the output files, so may not be entirely consistent with |
|
|
47 |
most Netpbm programs. |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
''psfile''[[__.ps__] is the name of the input file. |
|
|
51 |
__.pstopnm__ will add the __ps__ to the end of the |
|
|
52 |
name you specify if no file exists by the exact name you |
|
|
53 |
specify, but one with added does. Use __-__ to indicate |
|
|
54 |
Standard Input. |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
If you use the __-stdout__ option, __pstopnm__ outputs |
|
|
58 |
images of all the pages as a multi-image file to Standard |
|
|
59 |
Output. Otherwise, __pstopnm__ creates one file for each |
|
|
60 |
page in the Postscript document. The files are named as |
|
|
61 |
follows: If the input file is named __psfile.ps__, the |
|
|
62 |
name of the files will be __psfile001.ppm__, |
|
|
63 |
__psfile002.ppm__, etc. The filetype suffix is |
|
|
64 |
__.ppm__, __.pgm__, or __.pbm__, depending on which |
|
|
65 |
kind of output you choose with your invocation options. If |
|
|
66 |
the input file name does not end in __.ps__, the whole |
|
|
67 |
file name is used in the output file name. For example, if |
|
|
68 |
the input file is named __psfile.old__, the output file |
|
|
69 |
name is __psfile.old001.ppm__, etc. |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
Note that the output file selection is inconsistent with |
|
|
73 |
most Netpbm programs, because it does not default to |
|
|
74 |
Standard Output. This is for historical reasons, based on |
|
|
75 |
the fact that the Netpbm formats did not always provide for |
|
|
76 |
a sequence of images in a single file. |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
Each output file contains the image of a rectangular part of |
|
|
80 |
the page to which it pertains. The selected area will always |
|
|
81 |
be centered in the output file, and may have borders around |
|
|
82 |
it. The image area to be extracted from the !PostScript file |
|
|
83 |
and rendered into a portable anymap is defined by four |
|
|
84 |
numbers, the lower left corner and the upper right corner x |
|
|
85 |
and y coordinates. These coordinates are usually specified |
|
|
86 |
by the !BoundingBox comment in the !PostScript file header, |
|
|
87 |
but they can be overridden by the user by specifying one or |
|
|
88 |
more of the following options: __-llx__, __-lly__, |
|
|
89 |
__-urx__, and __-ury__. The presence and thickness of |
|
|
90 |
a border to be left around the image area is controlled by |
|
|
91 |
the use of the options __-xborder__ and __-yborder__. |
|
|
92 |
If __pstopnm__ does not find !BoundingBox parameters in |
|
|
93 |
the input, and you don't specify image area coordinates on |
|
|
94 |
the command line, __pstopnm__ uses default values. If |
|
|
95 |
your input is from Standard Input, __pstopnm__ does not |
|
|
96 |
use the !BoundingBox parameters (due to the technical |
|
|
97 |
difficulty of extracting that information and still feeding |
|
|
98 |
the file to Ghostscript), so you either have to specify the |
|
|
99 |
image area coordinates or take the default. |
|
|
100 |
|
|
|
101 |
|
|
|
102 |
Unless you specify both output file width and height, via |
|
|
103 |
the __-xsize__ and __-ysize__ options, __pstopnm__ |
|
|
104 |
maps the document into the output image by preserving its |
|
|
105 |
aspect ratio. |
|
|
106 |
!!OPTIONS |
|
|
107 |
|
|
|
108 |
|
|
|
109 |
__-forceplain__ |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
forces the output file to be in plain (text) format. |
|
|
113 |
Otherwise, it is in raw (binary) format. See pbm(1), |
|
|
114 |
etc. |
|
|
115 |
|
|
|
116 |
|
|
|
117 |
__-llx__ ''bx'' |
|
|
118 |
|
|
|
119 |
|
|
|
120 |
selects ''bx'' as the lower left corner x coordinate (in |
|
|
121 |
inches). |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
__-lly__ ''by'' |
|
|
125 |
|
|
|
126 |
|
|
|
127 |
selects ''by'' as the lower left corner y coordinate (in |
|
|
128 |
inches). |
|
|
129 |
|
|
|
130 |
|
|
|
131 |
__-landscape__ |
|
|
132 |
|
|
|
133 |
|
|
|
134 |
renders the image in landscape mode. |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
__-portrait__ |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
renders the image in portrait mode. |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
__-nocrop__ |
|
|
144 |
|
|
|
145 |
|
|
|
146 |
does not crop the output image dimensions to match the |
|
|
147 |
!PostScript image area dimensions. |
|
|
148 |
|
|
|
149 |
|
|
|
150 |
__-pbm -pgm -ppm__ |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
selects the format of the output file. By default, all files |
|
|
154 |
are rendered as portable pixmaps (ppm format). |
|
|
155 |
|
|
|
156 |
|
|
|
157 |
__-stdout__ |
|
|
158 |
|
|
|
159 |
|
|
|
160 |
causes output to go to Standard Output instead of to regular |
|
|
161 |
files, one per page (see description of output files above). |
|
|
162 |
Use __pnmsplit__ to extract individual pages from |
|
|
163 |
Standard Output. |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
__-urx__ ''tx'' |
|
|
167 |
|
|
|
168 |
|
|
|
169 |
selects ''tx'' as the upper right corner x coordinate (in |
|
|
170 |
inches). |
|
|
171 |
|
|
|
172 |
|
|
|
173 |
__-ury__ ''ty'' |
|
|
174 |
|
|
|
175 |
|
|
|
176 |
selects ''ty'' as the upper right corner y coordinate (in |
|
|
177 |
inches). |
|
|
178 |
|
|
|
179 |
|
|
|
180 |
__-verbose__ |
|
|
181 |
|
|
|
182 |
|
|
|
183 |
prints processing information to stdout. |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
__-xborder__ ''frac'' |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
specifies that the border width along the Y axis should be |
|
|
190 |
''frac'' times the document width as specified by the |
|
|
191 |
bounding box comment in the !PostScript file header. The |
|
|
192 |
default value is 0.1. |
|
|
193 |
|
|
|
194 |
|
|
|
195 |
__-xmax__ ''xs'' |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
specifies that the maximum output image width should have a |
|
|
199 |
size less or equal to ''xs'' pixels (default: |
|
|
200 |
612). |
|
|
201 |
|
|
|
202 |
|
|
|
203 |
__-xsize__ ''xsize'' |
|
|
204 |
|
|
|
205 |
|
|
|
206 |
specifies that the output image width must be exactly |
|
|
207 |
''xs'' pixels. |
|
|
208 |
|
|
|
209 |
|
|
|
210 |
__-yborder__ ''frac'' |
|
|
211 |
|
|
|
212 |
|
|
|
213 |
specifies that the border width along the X axis should be |
|
|
214 |
''frac'' times the document width as specified by the |
|
|
215 |
bounding box comment in the !PostScript file header. The |
|
|
216 |
default value is 0.1. |
|
|
217 |
|
|
|
218 |
|
|
|
219 |
__-ymax__ ''ys'' |
|
|
220 |
|
|
|
221 |
|
|
|
222 |
specifies that the maximum output image height should have a |
|
|
223 |
size less or equal to ''ys'' pixels (default: |
|
|
224 |
792). |
|
|
225 |
|
|
|
226 |
|
|
|
227 |
__-ysize__ ''ys'' |
|
|
228 |
|
|
|
229 |
|
|
|
230 |
specifies that the output image height must be exactly |
|
|
231 |
''ys'' pixels. |
|
|
232 |
!!BUGS |
|
|
233 |
|
|
|
234 |
|
|
|
235 |
The program will produce incorrect results with !PostScript |
|
|
236 |
files that initialize the current transformation matrix. In |
|
|
237 |
these cases, page translation and rotation will not have any |
|
|
238 |
effect. To render these files, probably the best bet is to |
|
|
239 |
use the following options: |
|
|
240 |
|
|
|
241 |
|
|
|
242 |
pstopnm -xborder 0 -yborder 0 -portrait -nocrop |
|
|
243 |
file.ps |
|
|
244 |
|
|
|
245 |
|
|
|
246 |
Additional options may be needed if the document is supposed |
|
|
247 |
to be rendered on a medium different from letter-size |
|
|
248 |
paper. |
|
|
249 |
!!SEE ALSO |
|
|
250 |
|
|
|
251 |
|
|
|
252 |
gs(1), pstofits(1), pnmtops(1), |
|
|
253 |
psidtopgm(1), pbmtolps(1), |
|
|
254 |
pbmtoepsi(1), pnmsplit(1) |
|
|
255 |
!!COPYRIGHT |
|
|
256 |
|
|
|
257 |
|
|
|
258 |
Copyright (c) 1992 Smithsonian Astrophysical Observatory |
|
|
259 |
!PostScript is a Trademark of Adobe Systems |
|
|
260 |
Incorporated. |
|
|
261 |
!!AUTHOR |
|
|
262 |
|
|
|
263 |
|
|
|
264 |
Alberto Accomazzi, WIPL, Center for |
|
|
265 |
Astrophysics. |
|
|
266 |
---- |