~ubuntu-branches/ubuntu/jaunty/ghostscript/jaunty-updates

« back to all changes in this revision

Viewing changes to doc/Ps2ps2.htm

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2009-01-20 16:40:45 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120164045-lnfhi0n30o5lwhwa
Tags: 8.64.dfsg.1~svn9377-0ubuntu1
* New upstream release (SVN rev 9377)
   o Fixes many bugs concerning PDF rendering, to make the PDF printing
     workflow correctly working.
   o Fixes long-standing bugs in many drivers, like input paper tray and
     duplex options not working for the built-in PCL 4, 5, 5c, 5e, and
     6/XL drivers, PDF input not working for bjc600, bjc800, and cups
     output devices, several options not working and uninitialized
     memory with cups output device.
   o Merged nearly all patches of the Ubuntu and Debian packages upstream.
   o Fixes LP: #317810, LP: #314439, LP: #314018.
* debian/patches/03_libpaper_support.dpatch,
  debian/patches/11_gs-cjk_font_glyph_handling_fix.dpatch,
  debian/patches/12_gs-cjk_vertical_writing_metrics_fix.dpatch,
  debian/patches/13_gs-cjk_cjkps_examples.dpatch,
  debian/patches/20_bbox_segv_fix.dpatch,
  debian/patches/21_brother_7x0_gdi_fix.dpatch,
  debian/patches/22_epsn_margin_workaround.dpatch,
  debian/patches/24_gs_man_fix.dpatch,
  debian/patches/25_toolbin_insecure_tmp_usage_fix.dpatch,
  debian/patches/26_assorted_script_fixes.dpatch,
  debian/patches/29_gs_css_fix.dpatch,
  debian/patches/30_ps2pdf_man_improvement.dpatch,
  debian/patches/31_fix-gc-sigbus.dpatch,
  debian/patches/34_ftbfs-on-hurd-fix.dpatch,
  debian/patches/35_disable_libcairo.dpatch,
  debian/patches/38_pxl-duplex.dpatch,
  debian/patches/39_pxl-resolution.dpatch,
  debian/patches/42_gs-init-ps-delaybind-fix.dpatch,
  debian/patches/45_bjc600-bjc800-pdf-input.dpatch,
  debian/patches/48_cups-output-device-pdf-duplex-uninitialized-memory-fix.dpatch,
  debian/patches/50_lips4-floating-point-exception.dpatch,
  debian/patches/52_cups-device-logging.dpatch,
  debian/patches/55_pcl-input-slot-fix.dpatch,
  debian/patches/57_pxl-input-slot-fix.dpatch,
  debian/patches/60_pxl-cups-driver-pdf.dpatch,
  debian/patches/62_onebitcmyk-pdf.dpatch,
  debian/patches/65_too-big-temp-files-1.dpatch,
  debian/patches/67_too-big-temp-files-2.dpatch,
  debian/patches/70_take-into-account-data-in-stream-buffer-before-refill.dpatch:
  Removed, applied upstream.
* debian/patches/01_docdir_fix_for_debian.dpatch,
  debian/patches/02_gs_man_fix_debian.dpatch,
  debian/patches/01_docdir-fix-for-debian.dpatch,
  debian/patches/02_docdir-fix-for-debian.dpatch: Renamed patches to
  make merging with Debian easier.
* debian/patches/32_improve-handling-of-media-size-changes-from-gv.dpatch, 
  debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch:
  regenerated for new source directory structure.
* debian/rules: Corrected paths to remove cidfmap (it is in Resource/Init/
  in GS 8.64) and to install headers (source paths are psi/ and base/ now).
* debian/rules: Remove all fontmaps, as DeFoMa replaces them.
* debian/local/pdftoraster/pdftoraster.c,
  debian/local/pdftoraster/pdftoraster.convs, debian/rules: Removed
  added pdftoraster filter and use the one which comes with Ghostscript.
* debian/ghostscript.links: s/8.63/8.64/

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
<head>
4
4
<title>ps2ps2: Converts Postscript Level 3 or PDF into Postscript Level 2</title>
5
 
<!-- $Id: Ps2ps2.htm 8909 2008-08-01 17:53:17Z giles $ -->
 
5
<!-- $Id: Ps2ps2.htm 9373 2009-01-19 09:47:56Z ken $ -->
6
6
<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
7
7
</head>
8
8
 
45
45
 
46
46
<h2><a name="Overview"></a>Overview</h2>
47
47
 
48
 
<b><tt>ps2ps2</tt></b> is a script for converting a PDF or a Postscript Level 3 into
 
48
<code>ps2ps2</code> is a script for converting a PDF or a Postscript Level 3 into
49
49
Postscript Level 2.
50
50
 
51
51
<p>
52
 
<b><tt>ps2ps2</tt></b> is implemented as a very small command script (batch
 
52
<code>ps2ps2</code> is implemented as a very small command script (batch
53
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
 
54
<code>ps2write</code>.  In order to use <b><tt>ps2ps2</tt></b>, the
 
55
<code>ps2write</code> device must be included in the makefile when
56
56
Ghostscript was compiled; see the <a
57
57
href="Make.htm#Features_and_devices">documentation on building
58
58
Ghostscript</a> for details: this is currently the case on all platforms, in
63
63
<h2><a name="Usage"></a>Usage</h2>
64
64
 
65
65
<p>
66
 
The usage for <b><tt>ps2ps2</tt></b> is
 
66
The usage for <code>ps2ps2</code> is
67
67
 
68
 
<blockquote><b><tt>
69
 
ps2ps2</tt></b> <em>[options] input.{ps|eps|pdf} output.ps</em>
 
68
<blockquote><code>
 
69
ps2ps2</code> <em>[options] input.{ps|eps|pdf} output.ps</em>
70
70
</blockquote>
71
71
 
72
72
 
79
79
<a href="Use.htm#Switches">here</a> for a complete list).
80
80
 
81
81
<p>
82
 
Since <b><tt>ps2write</tt></b> makes use of some printer 
 
82
Since <code>ps2write</code> makes use of some printer 
83
83
parameters while converting high level objects into Level 2 objects,
84
84
we strongly recommend to set those values in accordance with the
85
85
target printer or other output device.
86
86
In particular, it is important for
87
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.
 
88
<a href="Use.htm#FIXEDMEDIA"><code>-dFIXEDMEDIA</code></a>, and
 
89
<code>ProcessColorModel</code> to be set correctly.
90
90
 
91
91
<p>
92
92
<em>
95
95
ps2write converts such fonts into bitmap fonts,
96
96
using the resolution specified when ps2write is invoked.
97
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>
 
98
Therefore the page device parameter <code>PageSize</code>
99
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>
 
100
the <code>PageSize</code> entry of the <b><tt>Policies</tt></b>
101
101
dictionary to 3, in order to provide a proper page scaling
102
102
in the Postscript interpreter while ps2write is invoked.
103
103
</em>
104
104
 
105
105
<p>
106
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
 
107
<code>-d</code><em>parameter</em>=<em>value</em> or
 
108
<code>-s</code><em>parameter</em>=<em>string</em> switches for setting
109
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
 
110
conversion process.  The PostScript <code>setdistillerparams</code> and
 
111
<code>currentdistillerparams</code> operators are also recognized when
 
112
running <code>ps2ps2</code>, and provide an equivalent way to set these
113
113
parameters from within the PostScript input file.
114
114
 
115
115
<p>
116
 
The <b><tt>ps2write</tt></b> device handles the same set of distiller 
 
116
The <code>ps2write</code> device handles the same set of distiller 
117
117
parameters as
118
 
are handled by the <b><tt>pdfwrite</tt></b> device. See the 
 
118
are handled by the <code>pdfwrite</code> device. See the 
119
119
<a href="Ps2pdf.htm#Options">PostScript-to-PDF converter</a> 
120
120
documentation for a complete description of how to use them to
121
121
control the document conversion.
122
122
 
123
123
<p>
124
 
The following options may be important for <b><tt>ps2ps2</tt></b> due to the target printer features:
 
124
The following options may be important for <code>ps2ps2</code> due to the target printer features:
125
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>.
 
126
<dt><code>-dPatternImagemask=</code><em>boolean</em>,
 
127
<dt><code>-dMaxClipPathSize=</code><em>integer</em>,
 
128
<dt><code>-dMaxShadingBitmapSize=</code><em>integer</em>,
 
129
<dt><code>-dHaveTrueTypes=</code><em>boolean</em>.
130
130
</dl>
131
131
See <a href="Ps2pdf.htm#Options">PostScript-to-PDF converter</a> for details.
132
132
 
133
 
The option <b><tt>-dMaxInlineImageSize=</tt></b><em>integer</em>
134
 
Must not be used with <tt><b>ps2ps2</tt></b>.
 
133
The option <code>-dMaxInlineImageSize=</code><em>integer</em>
 
134
Must not be used with <code>ps2ps2</code>.
135
135
 
136
136
 
137
137
<p>
139
139
defined in the DistillerParameters document included in the 
140
140
<a href="http://partners.adobe.com/public/developer/acrobat/sdk/index.html">Acrobat SDK</a>.
141
141
 
142
 
Default values are same as the <tt><b>printer</tt></b> settings defined 
 
142
Default values are same as the <code>printer</code> settings defined 
143
143
in <a href="Ps2pdf.htm#Options">PostScript-to-PDF converter</a>,
144
144
with these exceptions:
145
145
 
146
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>,
 
147
<dt><code>/PreserveHalftoneInfo</code> <em>true</em>,
 
148
<dt><code>/TransferFunctionInfo</code> <em>/Preserve</em>,
 
149
<dt><code>/MaxViewerMemorySize</code> <em>8000000</em>,
 
150
<dt><code>/CompressPages</code> <em>false</em>,
 
151
<dt><code>/CompressFonts</code> <em>false</em>,
 
152
<dt><code>/ASCII85EncodePages</code> <em>true</em>,
153
153
</dl>
154
154
 
155
155
<p>
157
157
<p>
158
158
 
159
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.
 
160
<dt>
 
161
<code>-dCompressEntireFile=</code><em>boolean</em>
 
162
<dd>When this parameter is true, the <code>LZWEncode</code>
 
163
and <code>ASCII85Encode</code> filters are being applied to entire output file.
 
164
In this case <code>CompressPages</code> should be false to exclude a dual compression.
164
165
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>.
 
166
if <code>CompressPages</code> is true.
 
167
Default value is <code>false</code>.
167
168
</dl>
168
169
 
169
170
 
179
180
program that reads the result of ps2ps2.
180
181
 
181
182
<dl>
182
 
<dt><b><tt>-dRotatePages=</tt></b><em>boolean</em>. 
 
183
<dt><code>-dRotatePages=</code><em>boolean</em>. 
183
184
<dd>The printer will rotate pages 
184
185
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
Must be <em>false</em> if <code>-dSetPageSize=true</code>.
186
187
 
187
 
<dt><b><tt>-dFitPages=</tt></b><em>boolean</em>. 
 
188
<dt><code>-dFitPages=</code><em>boolean</em>. 
188
189
<dd>The printer will scale pages down
189
190
to fit into the real page size. The rendering quality may be poor due to the scaling,
190
191
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>
 
192
(see the <em>ps2write</em> device parameter <code>HaveTrueTypes</code>;
 
193
See <a href="#Options">Options</a> about the <code>PageSize</code> entry of the <b><tt>Policies</tt></b>
193
194
dictionary while the conversion step). 
194
195
Default value : <em>false</em>.
195
 
Must be <em>false</em> if <b><tt>-dSetPageSize=true</tt></b>.
 
196
Must be <em>false</em> if <code>-dSetPageSize=true</code>.
196
197
 
197
 
<dt><b><tt>-dSetPageSize=</tt></b><em>boolean</em>. 
 
198
<dt><code>-dSetPageSize=</code><em>boolean</em>. 
198
199
<dd>The printer will try to set page size from the job. 
199
200
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
Must be <em>false</em> if <code>-dRotatePages=true</code> or <b><tt>-dFitPages=true</tt></b>.
201
202
 
202
203
</dl>
203
204
 
204
205
<p>
205
206
These correspond to keys in the Postscript <em>userdict</em> 
206
207
of the target printer's virtual memory to control its behavior while 
207
 
executing a job generated with <tt><b>ps2ps2</tt></b>.
 
208
executing a job generated with <code>ps2ps2</code>.
208
209
 
209
210
<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.
 
211
These keys can be set when executing ps2ps2 (or using the ps2write device), 
 
212
this 'fixes' the resulting behaviour according to which key has been set. 
 
213
If these keys are not defined during conversion, the resulting PostScript 
 
214
will not attempt any form of media selection. 
 
215
 
 
216
In this case the behaviour can then be modified by setting the keys, either by modifying the resulting 
 
217
PostScript or setting the values in some other manner on the target device.
213
218
 
214
219
<hr>
215
220
 
223
228
<a href="#Options">Options</a> while generating a printer job.
224
229
 
225
230
<p>
226
 
<b><tt>ps2ps2</tt></b> does not generate DSC comments.
 
231
<code>ps2ps2</code> does not generate DSC comments.
227
232
 
228
233
 
229
234
<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
 
235
<code>ps2ps2</code> provides simplified interface to Ghostscript
 
236
command line. It is not possible to use <code>-c</code> option or pass
232
237
multiple source files. For the unrestricted access to the command line
233
238
parameters, use Ghostscript directly.
234
239
 
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>
 
240
<blockquote><code>
 
241
gs -q -dSAFER -dNOPAUSE -dBATCH -sOutputFile=file.ps </code><em>[more options]</em><code> \<br>
 
242
&nbsp;&nbsp;-sDEVICE=ps2write </code><em>source1.pdf [more files]</em>
238
243
</blockquote>
239
244
 
240
245
<hr>