Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_tlsv12/sys/src/cmd/gs/doc/Ps2ps2.htm – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<html>
3
<head>
4
<title>ps2ps2: Converts Postscript Level 3 or PDF into Postscript Level 2</title>
5
<!-- $Id: Ps2ps2.htm,v 1.7 2005/10/20 19:46:23 ray Exp $ -->
6
<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
7
</head>
8
 
9
<body>
10
<!-- [1.0 begin visible header] ============================================ -->
11
 
12
<!-- [1.1 begin headline] ================================================== -->
13
 
14
<h1><tt>ps2ps2</tt>: Converts Postscript Level 3 or PDF into Postscript Level 2</h1>
15
 
16
<!-- [1.1 end headline] ==================================================== -->
17
 
18
<!-- [1.2 begin table of contents] ========================================= -->
19
 
20
<h2>Table of contents</h2>
21
 
22
<blockquote><ul>
23
<li><a href="#Overview">Overview</a>
24
<li><a href="#Usage">Usage</a>
25
<li><a href="#Options">Options</a>
26
<li><a href="#PPD">Ghostscript PS2 Printer Description</a>
27
<li><a href="#printer_control">Controlling the printer behavior</a>
28
<li><a href="#Limitations">Limitations</a>
29
</ul></blockquote>
30
 
31
<!-- [1.2 end table of contents] =========================================== -->
32
 
33
<!-- [1.3 begin hint] ====================================================== -->
34
 
35
<p>For other information, see the <a href="Readme.htm">Ghostscript
36
overview</a>.
37
 
38
<!-- [1.3 end hint] ======================================================== -->
39
 
40
<hr>
41
 
42
<!-- [1.0 end visible header] ============================================== -->
43
 
44
<!-- [2.0 begin contents] ================================================== -->
45
 
46
<h2><a name="Overview"></a>Overview</h2>
47
 
48
<b><tt>ps2ps2</tt></b> is a script for converting a PDF or a Postscript Level 3 into
49
Postscript Level 2.
50
 
51
<p>
52
<b><tt>ps2ps2</tt></b> is implemented as a very small command script (batch
53
file) that invokes Ghostscript, selecting a special "output device" called
54
<b><tt>ps2write</tt></b>.  In order to use <b><tt>ps2ps2</tt></b>, the
55
<b><tt>ps2write</tt></b> device must be included in the makefile when
56
Ghostscript was compiled; see the <a
57
href="Make.htm#Features_and_devices">documentation on building
58
Ghostscript</a> for details: this is currently the case on all platforms, in
59
Ghostscript as we distribute it.
60
 
61
<hr>
62
 
63
<h2><a name="Usage"></a>Usage</h2>
64
 
65
<p>
66
The usage for <b><tt>ps2ps2</tt></b> is
67
 
68
<blockquote><b><tt>
69
ps2ps2</tt></b> <em>[options] input.{ps|eps|pdf} output.ps</em>
70
</blockquote>
71
 
72
 
73
 
74
<h2><a name="Options"></a>Options</h2>
75
 
76
<p>
77
The <em>options</em> given on the command line may include any switches 
78
that may be used with Ghostscript's PostScript and PDF interpreter (see 
79
<a href="Use.htm#Switches">here</a> for a complete list).
80
 
81
<p>
82
Since <b><tt>ps2write</tt></b> makes use of some printer 
83
parameters while converting high level objects into Level 2 objects,
84
we strongly recommend to set those values in accordance with the
85
target printer or other output device.
86
In particular, it is important for
87
<a  href="Use.htm#Output_resolution">Output resolution</a>,
88
<a href="Use.htm#FIXEDMEDIA"><b><tt>-dFIXEDMEDIA</tt></b></a>, and
89
<b><tt>ProcessColorModel</tt></b></a> to be set correctly.
90
 
91
<p>
92
<em>
93
<b>Important :</b>
94
If the target printer can't handle some font type,
95
ps2write converts such fonts into bitmap fonts,
96
using the resolution specified when ps2write is invoked.
97
Particularly this always happen with CID fonts, which are not Postscript Level 2 objects.
98
Therefore the page device parameter <b><tt>PageSize</tt></b>
99
must match the target printer, and we recommend to set
100
the <b><tt>PageSize</tt></b> entry of the <b><tt>Policies</tt></b>
101
dictionary to 3, in order to provide a proper page scaling
102
in the Postscript interpreter while ps2write is invoked.
103
</em>
104
 
105
<p>
106
More importantly, <em>options</em> passed to ps2ps2 may include
107
<b><tt>-d</tt></b><em>parameter</em>=<em>value</em> or
108
<b><tt>-s</tt></b><em>parameter</em>=<em>string</em> switches for setting
109
"distiller parameters", Adobe's documented parameters for controlling the
110
conversion process.  The PostScript <b><tt>setdistillerparams</tt></b> and
111
<b><tt>currentdistillerparams</tt></b> operators are also recognized when
112
running <b><tt>ps2ps2</tt></b>, and provide an equivalent way to set these
113
parameters from within the PostScript input file.
114
 
115
<p>
116
The <b><tt>ps2write</tt></b> device handles the same set of distiller 
117
parameters as
118
are handled by the <b><tt>pdfwrite</tt></b> device. See the 
119
<a href="Ps2pdf.htm#Options">PostScript-to-PDF converter</a> 
120
documentation for a complete description of how to use them to
121
control the document conversion.
122
 
123
<p>
124
The following options may be important for <b><tt>ps2ps2</tt></b> due to the target printer features:
125
<dl>
126
<dt><b><tt>-dPatternImagemask=</tt></b><em>boolean</em>,
127
<dt><b><tt>-dMaxClipPathSize=</tt></b><em>integer</em>,
128
<dt><b><tt>-dMaxShadingBitmapSize=</tt></b><em>integer</em>,
129
<dt><b><tt>-dHaveTrueTypes=</tt></b><em>boolean</em>.
130
</dl>
131
See <a href="Ps2pdf.htm#Options">PostScript-to-PDF converter</a> for details.
132
 
133
The option <b><tt>-dMaxInlineImageSize=</tt></b><em>integer</em>
134
Must not be used with <tt><b>ps2ps2</tt></b>.
135
 
136
 
137
<p>
138
This set includes of the Acrobat Distiller 5 parameters
139
defined in the DistillerParameters document included in the 
140
<a href="http://partners.adobe.com/public/developer/acrobat/sdk/index.html">Acrobat SDK</a>.
141
 
142
Default values are same as the <tt><b>printer</tt></b> settings defined 
143
in <a href="Ps2pdf.htm#Options">PostScript-to-PDF converter</a>,
144
with these exceptions:
145
 
146
<dl>
147
<dt><b><tt>/PreserveHalftoneInfo</tt></b> <em>true</em>,
148
<dt><b><tt>/TransferFunctionInfo</tt></b> <em>/Preserve</em>,
149
<dt><b><tt>/MaxViewerMemorySize</tt></b> <em>8000000</em>,
150
<dt><b><tt>/CompressPages</tt></b> <em>false</em>,
151
<dt><b><tt>/CompressFonts</tt></b> <em>false</em>,
152
<dt><b><tt>/ASCII85EncodePages</tt></b> <em>true</em>,
153
</dl>
154
 
155
<p>
156
The following ps2write specific option control the output file compression :
157
<p>
158
 
159
<dl>
160
<b><tt>-dCompressEntireFile=</tt></b><em>boolean</em>
161
<dd>When this parameter is true, the <b><tt>LZWEncode</b></tt>
162
and <b><tt>ASCII85Encode</b></tt> filters are being applied to entire output file.
163
In this case <b><tt>CompressPages</b></tt> should be false to exclude a dual compression.
164
When this parameter is false, those filters applies to the initial procset only,
165
if <b><tt>CompressPages</b></tt> is true.
166
Default value is <b><tt>false</b></tt>.
167
</dl>
168
 
169
 
170
<h2><a name="PPD"></a>Ghostscript PS2 Printer Description</h2>
171
<p>
172
Not implemented yet.
173
<hr>
174
 
175
<h2><a name="printer_control"></a>Controlling the printer behavior</h2>
176
 
177
<p>
178
A few options can be used to control the behavior of the printer or 
179
program that reads the result of ps2ps2.
180
 
181
<dl>
182
<dt><b><tt>-dRotatePages=</tt></b><em>boolean</em>. 
183
<dd>The printer will rotate pages 
184
for a better fitting into the real page size. Default value : <em>false</em>.
185
Must be <em>false</em> if <b><tt>-dSetPageSize=true</tt></b>.
186
 
187
<dt><b><tt>-dFitPages=</tt></b><em>boolean</em>. 
188
<dd>The printer will scale pages down
189
to fit into the real page size. The rendering quality may be poor due to the scaling,
190
especially for fonts which Ghostscript had converted into bitmaps 
191
(see the <em>ps2write</em> device parameter <b><tt>HaveTrueTypes</tt></b>;
192
See <a href="#Options">Options</a> about the <b><tt>PageSize</tt></b> entry of the <b><tt>Policies</tt></b>
193
dictionary while the conversion step). 
194
Default value : <em>false</em>.
195
Must be <em>false</em> if <b><tt>-dSetPageSize=true</tt></b>.
196
 
197
<dt><b><tt>-dSetPageSize=</tt></b><em>boolean</em>. 
198
<dd>The printer will try to set page size from the job. 
199
Only use with printers which can handle random <em>PageSize</em>.
200
Must be <em>false</em> if <b><tt>-dRotatePages=true</tt></b> or <b><tt>-dFitPages=true</tt></b>.
201
 
202
</dl>
203
 
204
<p>
205
These correspond to keys in the Postscript <em>userdict</em> 
206
of the target printer's virtual memory to control its behavior while 
207
executing a job generated with <tt><b>ps2ps2</tt></b>.
208
 
209
<p>
210
Currently Ghostscript does not provide a method for 
211
incorporating these in a print job.
212
Users should refer to the printer's documentation.
213
 
214
<hr>
215
 
216
 
217
<h2><a name="Limitations"></a>Limitations</h2>
218
 
219
<p>
220
Attempting to generate a device independent Postscript Level 2 is a bad idea.
221
Postscript Level 2 data are device dependent by definition. Let Ghostscript know
222
the features of the specific printer as described in 
223
<a href="#Options">Options</a> while generating a printer job.
224
 
225
<p>
226
<b><tt>ps2ps2</tt></b> does not generate DSC comments.
227
 
228
 
229
<p>
230
<b><tt>ps2ps2</tt></b> provides simplified interface to Ghostscript
231
command line. It is not possible to use <tt><b>-c</tt></b> option or pass
232
multiple source files. For the unrestricted access to the command line
233
parameters, use Ghostscript directly.
234
 
235
<blockquote><b><tt>
236
gs -q -dSAFER -dNOPAUSE -dBATCH -sOutputFile=file.ps </tt></b><em>[more options]</em><b><tt> \<br>
237
&nbsp;&nbsp;-sDEVICE=ps2write </b></tt><em>source1.pdf [more files]</em>
238
</blockquote>
239
 
240
<hr>
241
 
242
 
243
<!-- [2.0 end contents] ==================================================== -->
244
 
245
<!-- [3.0 begin visible trailer] =========================================== -->
246
 
247
<p>
248
<small>Copyright &copy; 1996, 2000, 2004 artofcode LLC.  All rights
249
reserved.</small>
250
 
251
<p>
252
This software is provided AS-IS with no warranty, either express or
253
implied.
254
 
255
This software is distributed under license and may not be copied,
256
modified or distributed except as expressly authorized under the terms
257
of the license contained in the file LICENSE in this distribution.
258
 
259
For more information about licensing, please refer to
260
http://www.ghostscript.com/licensing/. For information on
261
commercial licensing, go to http://www.artifex.com/licensing/ or
262
contact Artifex Software, Inc., 101 Lucas Valley Road #110,
263
San Rafael, CA  94903, U.S.A., +1(415)492-9861.
264
 
265
<p>
266
<small>Ghostscript version 8.53, 20 October 2005
267
 
268
<!-- [3.0 end visible trailer] ============================================= -->
269
 
270
</body>
271
</html>