|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/share/doc/ghostscript-8.15/ |
Upload File : |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>ps2pdf: PostScript-to-PDF converter</title> <!-- $Id: Ps2pdf.htm,v 1.51.2.14 2005/01/12 18:28:53 giles Exp $ --> <!-- Originally: ps2pdf.txt --> <link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style"> </head> <body> <!-- [1.0 begin visible header] ============================================ --> <!-- [1.1 begin headline] ================================================== --> <h1><tt>ps2pdf</tt>: PostScript-to-PDF converter</h1> <!-- [1.1 end headline] ==================================================== --> <!-- [1.2 begin table of contents] ========================================= --> <h2>Table of contents</h2> <blockquote><ul> <li><a href="#Overview">Overview</a> <li><a href="#Usage">Usage</a> <li><a href="#Orientation">Setting page orientation</a> <li><a href="#Options">Options</a> <li><a href="#Limitations">Limitations</a> <li><a href="#PPD">Ghostscript PDF Printer Description</a> <li><a href="#Problems">Known problems</a> <li><a href="#Ps2pdf_vs_AD">Comparison of <b><tt>ps2pdf</tt></b> and Acrobat Distiller</a> <li><a href="#Acknowledgments">Acknowledgments</a> </ul></blockquote> <!-- [1.2 end table of contents] =========================================== --> <!-- [1.3 begin hint] ====================================================== --> <p>For other information, see the <a href="Readme.htm">Ghostscript overview</a>. <!-- [1.3 end hint] ======================================================== --> <hr> <!-- [1.0 end visible header] ============================================== --> <!-- [2.0 begin contents] ================================================== --> <h2><a name="Overview"></a>Overview</h2> <b><tt>ps2pdf</tt></b> is a work-alike for nearly all the functionality (but not the user interface) of Adobe's Acrobat<small><sup>TM</sup></small> Distiller<small><sup>TM</sup></small> product: it converts PostScript files to Portable Document Format (PDF) files. <p> <b><tt>ps2pdf</tt></b> is implemented as a very small command script (batch file) that invokes Ghostscript, selecting a special "output device" called <b><tt>pdfwrite</tt></b>. In order to use <b><tt>ps2pdf</tt></b>, the <b><tt>pdfwrite</tt></b> device must be included in the makefile when Ghostscript was compiled; see the <a href="Make.htm#Features_and_devices">documentation on building Ghostscript</a> for details: this is currently the case on all platforms, in Ghostscript as we distribute it. <hr> <h2><a name="Usage"></a>Usage</h2> <p> The usage for <b><tt>ps2pdf</tt></b> is <blockquote><b><tt> ps2pdf</tt></b> <em>[options] input.[e]ps output.pdf</em> </blockquote> <p> or, on Unix systems and some versions of Windows NT and OS/2 <blockquote><b><tt> ps2pdf</tt></b> <em>input.[e]ps</em> </blockquote> <p> which is equivalent to <blockquote><b><tt> ps2pdf</tt></b> <em>input.[e]ps input.pdf</em> </blockquote> <p> There are actually several different <b><tt>ps2pdf</tt></b><em>*</em> scripts: the name <b><tt>ps2pdf</tt></b> above refers to any of them. <ul> <li><b><tt>ps2pdf12</tt></b> produces PDF 1.2 output (Acrobat 3-and-later compatible). <li><b><tt>ps2pdf13</tt></b> produces PDF 1.3 output (Acrobat 4-and-later compatible). <li><b><tt>ps2pdf14</tt></b> produces PDF 1.4 output (Acrobat 5-and-later compatible). <li><b><tt>ps2pdf</tt></b> per se currently produces PDF 1.2 output. However, this may change in the future. If you care about the compatibility level of the output, use <b><tt>ps2pdf12</tt></b>, <b><tt>ps2pdf13</tt></b>, or <b><tt>ps2pdf14</tt></b>, or use the <b><tt>-dCompatibilityLevel=</tt></b><em>1.x</em> switch in the command line. </ul> <p> Note that if you specify a value for <b><tt>PDFSETTINGS</tt></b>, this chooses PDF 1.2 or 1.3 output depending on the value of <b><tt>PDFSETTINGS</tt></b>: this overrides the output format specified by the script name. You can still specify the output format by using <b><tt>-dCompatibilityLevel=</tt></b> <em>after</em> <b><tt>-dPDFSETTINGS=</tt></b>. <p> All of these scripts actually call a script named <b><tt>ps2pdfwr</tt></b> or <b><tt>ps2pdfxx</tt></b>. The Unix <b><tt>ps2pdfwr</tt></b> script assumes that the Ghostscript executable is named <b><tt>gs</tt></b>; it is unlikely that you will need to change this. The DOS and MS Windows <b><tt>ps2pdfxx.bat</tt></b> script uses the value of the <b><tt>GSC</tt></b> environment variable, if defined, as the name of the executable; otherwise the script assumes the executable is named <b><tt>gswin32c</tt></b>. So in these environments, if the executable has a different name, you must set <b><tt>GSC</tt></b> to the name of the executable. <hr> <h2><a name="Orientation"></a>Setting page orientation</h2> <p> By default Ghostscript determines viewing page orientation based on the dominant text orientation on the page. Sometimes, when the page has text in several orientations or has no text at all, wrong orientation can be selected. <p> Acrobat Distiller parameter <b><tt>AutoRotatePages</b></tt> controls the automatic orientation selection algorithm. On Ghostscript, besides input stream, Distiller parameters can be given as command line arguments. For instance: <b><tt>-dAutoRotatePages=/None</b></tt> or <b><tt>/All</b></tt> or <b><tt>/PageByPage</b></tt>. <p> When there is no text on the page or automatic page rotation is set to <b><tt>/None</b></tt> an orientation value from setpagedevice is used. Valid values are: <b><tt>0</b></tt> (portrait), <b><tt>3</b></tt> (landscape), <b><tt>2</b></tt> (upside down), and <b><tt>1</b></tt> (seascape). The orientation can be set from the command line as <b><tt>"-c <</Orientation 3>> setpagedevice"</b></tt> using Ghostscript directly but cannot be set in <b><tt>ps2pdf</b></tt>. See <a href="#Limitations">Limitations</a> below. </pre> <p> Ghostscript passes the orientation values from DSC comments to <b><tt>pdfwrite</b></tt> driver but they are effectively ignored there. This appears to be consistent with Distiller 5 behavior. <hr> <h2><a name="Options"></a>Options</h2> <p> The <em>options</em> in the command line may include any switches that may be used with Ghostscript's PostScript and PDF interpreter (see <a href="Use.htm#Switches">here</a> for a complete list), although almost none of them are useful with <b><tt>ps2pdf</tt></b>. The following may be useful: <dl> <dt><b><tt>-r</tt></b><em>resolution</em> <dd>Sets the resolution for pattern fills and for fonts that must be converted to bitmaps. <dt><b><tt>-dProcessColorModel=</tt></b><em>device_color_space</em> <dd>Sets the color space to be used for device-dependent colors in the output. <em>device_color_space</em> may be <b><tt>/DeviceGray</tt></b>, <b><tt>/DeviceRGB</tt></b>, or <b><tt>/DeviceCMYK</tt></b>; the default value is <b><tt>/DeviceRGB</tt></b>. Note that this does not affect images: see <a href="#Limitations">Limitations</a> below. </dl> <p> More importantly, <em>options</em> may include <b><tt>-d</tt></b><em>parameter</em>=<em>value</em> or <b><tt>-s</tt></b><em>parameter</em>=<em>string</em> switches for setting "distiller parameters", Adobe's documented parameters for controlling the conversion process. The PostScript <b><tt>setdistillerparams</tt></b> and <b><tt>currentdistillerparams</tt></b> operators are also recognized when running <b><tt>ps2pdf</tt></b>, and provide an equivalent way to set these parameters from within the PostScript input file. <p> <b><tt>ps2pdf</tt></b> also recognizes the following switches: <dl> <dt><b><tt>-dCompressFonts=</tt></b><em>boolean</em> <dd>Defines whether <b><tt>ps2pdf</tt></b> will compress embedded fonts in the output. The default value is <b><tt>true</tt></b>; the <b><tt>false</tt></b> setting is intended only for debugging. <dt><b><tt>-dMaxInlineImageSize=</tt></b><em>integer</em> <dd>Specifies the maximal size of image in bytes, which <b><tt>ps2pdf</tt></b> will imbed into a context stream rather than create an XObject. The default value is <b><tt>4000</tt></b>. Note that redundant inline images can't merge into a single object, so set a small or zero value if the source document is expected to contain multiple equal images. <dt><b><tt>-dPDFSETTINGS=</tt></b><em>configuration</em> <dd>Presets the "distiller parameters" to one of four predefined settings: <ul> <li><b><tt>/screen</tt></b> selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting. <li><b><tt>/ebook</tt></b> selects medium-resolution output similar to the Acrobat Distiller "eBook" setting. <li><b><tt>/printer</tt></b> selects output similar to the Acrobat Distiller "Print Optimized" setting. <li><b><tt>/prepress</tt></b> selects output similar to Acrobat Distiller "Prepress Optimized" setting. <li><b><tt>/default</tt></b> selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file. </ul> </dl> <a name="Encryption"></a> The following switches used for creating encrypted documents : <dl> <dt><b><tt>-sOwnerPassword=</tt></b><em>string</em> <dd>Defines that the document to be encrypted with the specified owner password. </dl> <dl> <dt><b><tt>-sUserPassword=</tt></b><em>string</em> <dd>Defines the user password for opening the document. If empty, the document can be opened with no password, but the owner password is required to edit it. </dl> <dl> <dt><b><tt>-dPermissions=</tt></b><em>number</em> <dd>Defines the PDF permissions. Negative values are allowed to represent unsigned integers with the highest bit set. </dl> <dl> <dt><b><tt>-dEncryptionR=</tt></b><em>number</em> <dd>Defines the encryption method revision number - either 2 or 3. </dl> <dl> <dt><b><tt>-dKeyLength=</tt></b><em>number</em> <dd>Defines the length (in bits) of the encryption key. Must be a multiple of 8 in the interval [40, 128]. If the length isn't 40, <b><tt>-dEncryptionR</tt></b> must be 3. </dl> <p> <b><tt>ps2pdf</tt></b> recognizes all of the Acrobat Distiller 5 parameters in <a href="http://partners.adobe.com/developer/en/acrobat/sdk/DistillerParameters.pdf"> Adobe's "Distiller Parameters" documentation</a>. Cells in the table containing '=' mean that the value of the parameter is the same as in the "default" column. <blockquote><table cellpadding=0 cellspacing=0> <tr valign=bottom> <th align=left>Parameter name <td> <th align=left>Notes <td> <th align=left>default <td> <th align=left>screen <td> <th align=left>ebook <td> <th align=left>printer <td> <th align=left>prepress <tr> <td colspan=13><hr> <tr valign=top><td><b><tt>AlwaysEmbed</tt></b><td><td><td><td>[]<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>AntiAliasColorImages</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>AntiAliasGrayImages</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>AntiAliasMonoImages</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ASCII85EncodePages</tt></b><td><td><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>AutoFilterColorImages</tt></b><td><td><a href="#note_1">(1)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>AutoFilterGrayImages</tt></b><td><td><a href="#note_1">(1)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>AutoPositionEPSFiles</tt></b><td><td><a href="#note_0">(0)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>AutoRotatePages</tt></b><td><td><td><td>/PageByPage<td><td>/PageByPage<td><td>/All<td><td>/None<td><td>/None <tr valign=top><td><b><tt>Binding</tt></b><td><td><a href="#note_0">(0)</a><td><td>/Left<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>CalCMYKProfile</tt></b><td><td><a href="#note_0">(0)</a><td><td>()<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>CalGrayProfile</tt></b><td><td><a href="#note_0">(0)</a><td><td>()<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>CalRGBProfile</tt></b><td><td><a href="#note_0">(0)</a><td><td>()<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>CannotEmbedFontPolicy</tt></b><td><td><a href="#note_0">(0)</a><td><td>/Warning<td><td>/Warning<td><td>/Warning<td><td>/Warning<td><td>/Error <tr valign=top><td><b><tt>ColorACSImageDict</tt></b><td><td><td><td><a href="#note_7">(note 7)</a><td><td><a href="#note_10">(note 10)</a><td><td><a href="#note_10">(note 10)</a><td><td><a href="#note_8">(note 8)</a><td><td><a href="#note_9">(note 9)</a> <tr valign=top><td><b><tt>ColorConversionStrategy</tt></b><td><td><a href="#note_0">(0</a>,<a href="#note_6">6)</a><td><td>/LeaveColorUnchanged<td><td>/sRGB<td><td>/sRGB<td><td>/UseDeviceIndependentColor<td><td>/LeaveColorUnchanged <tr valign=top><td><b><tt>ColorImageDepth</tt></b><td><td><td><td>-1<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ColorImageDict</tt></b><td><td><td><td><a href="#note_7">(note 7)</a><td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ColorImageFilter</tt></b><td><td><td><td>/DCTEncode<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ColorImageDownsampleThreshold</tt></b><td><td><td><td>1.5<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ColorImageDownsampleType</tt></b><td><td><a href="#note_3">(3)</a><td><td>/Subsample<td><td>/Average<td><td>/Bicubic<td><td>/Bicubic<td><td>/Bicubic <tr valign=top><td><b><tt>ColorImageResolution</tt></b><td><td><td><td>72<td><td>72<td><td>150<td><td>300<td><td>300 <tr valign=top><td><b><tt>CompatibilityLevel</tt></b><td><td><td><td>1.3<td><td>1.2<td><td>1.3<td><td>1.3<td><td>1.3 <tr valign=top><td><b><tt>CompressPages</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ConvertCMYKImagesToRGB</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ConvertImagesToIndexed</tt></b><td><td><a href="#note_0">(0)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>CoreDistVersion</tt></b><td><td><td><td>4000<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>CreateJobTicket</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>false<td><td>false<td><td>true<td><td>true <tr valign=top><td><b><tt>DefaultRenderingIntent</tt></b><td><td><td><td>/Default<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>DetectBlends</tt></b><td><td><a href="#note_0">(0)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>DoThumbnails</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>false<td><td>false<td><td>false<td><td>true <tr valign=top><td><b><tt>DownsampleColorImages</tt></b><td><td><td><td>false<td><td>true<td><td>true<td><td>false<td><td>false <tr valign=top><td><b><tt>DownsampleGrayImages</tt></b><td><td><td><td>false<td><td>true<td><td>true<td><td>false<td><td>false <tr valign=top><td><b><tt>DownsampleMonoImages</tt></b><td><td><td><td>false<td><td>true<td><td>true<td><td>false<td><td>false <tr valign=top><td><b><tt>EmbedAllFonts</tt></b><td><td><td><td>true<td><td>false<td><td>true<td><td>true<td><td>true <tr valign=top><td><b><tt>EmitDSCWarnings</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>EncodeColorImages</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>EncodeGrayImages</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>EncodeMonoImages</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>EndPage</tt></b><td><td><a href="#note_0">(0)</a><td><td>-1<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>GrayACSImageDict</tt></b><td><td><td><td><a href="#note_7">(note 7)</a><td><td><a href="#note_7">(note 7)</a><td><td><a href="#note_10">(note 10)</a><td><td><a href="#note_8">(note 8)</a><td><td><a href="#note_9">(note 9)</a> <tr valign=top><td><b><tt>GrayImageDepth</tt></b><td><td><td><td>-1<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>GrayImageDict</tt></b><td><td><td><td><a href="#note_7">(note 7)</a><td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>GrayImageDownsampleThreshold</tt></b><td><td><td><td>1.5<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>GrayImageDownsampleType</tt></b><td><td><a href="#note_3">(3)</a><td><td>/Subsample<td><td>/Average<td><td>/Bicubic<td><td>/Bicubic<td><td>/Bicubic <tr valign=top><td><b><tt>GrayImageFilter</tt></b><td><td><td><td>/DCTEncode<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>GrayImageResolution</tt></b><td><td><td><td>72<td><td>72<td><td>150<td><td>300<td><td>300 <tr valign=top><td><b><tt>ImageMemory</tt></b><td><td><a href="#note_0">(0)</a><td><td>524288<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>LockDistillerParams</tt></b><td><td><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>LZWEncodePages</tt></b><td><td><a href="#note_2">(2)</a><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>MaxSubsetPct</tt></b><td><td><td><td>100<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>MonoImageDepth</tt></b><td><td><td><td>-1<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>MonoImageDict</tt></b><td><td><td><td><<K -1>><td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>MonoImageDownsampleThreshold</tt></b><td><td><td><td>1.5<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>MonoImageDownsampleType</tt></b><td><td><td><td>/Subsample<td><td>/Average<td><td>/Bicubic<td><td>/Bicubic<td><td>/Bicubic <tr valign=top><td><b><tt>MonoImageFilter</tt></b><td><td><td><td>/CCITTFaxEncode<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>MonoImageResolution</tt></b><td><td><td><td>300<td><td>300<td><td>300<td><td>1200<td><td>1200 <tr valign=top><td><b><tt>NeverEmbed</tt></b><td><td><td><td><a href="#note_11">(note 11)</a><a href="#note_12">(note 12)</a><td><td><a href="#note_11">(note 11)</a><a href="#note_12">(note 12)</a><td><td><a href="#note_11">(note 11)</a><a href="#note_12">(note 12)</a><td><td>[]<a href="#note_12">(note 12)</a><td><td>[]<a href="#note_12">(note 12)</a> <tr valign=top><td><b><tt>OffOptimizations</tt></b><td><td><td><td>0<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>OPM</tt></b><td><td><td><td>1<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>Optimize</tt></b><td><td><a href="#note_0">(0</a>,<a href="#note_5">5)</a><td><td>false<td><td>true<td><td>true<td><td>true<td><td>true <tr valign=top><td><b><tt>ParseDSCComments</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>ParseDSCCommentsForDocInfo</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>PreserveCopyPage</tt></b><td><td><a href="#note_0">(0)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>PreserveEPSInfo</tt></b><td><td><a href="#note_0">(0)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>PreserveHalftoneInfo</tt></b><td><td><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>PreserveOPIComments</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>false<td><td>false<td><td>true<td><td>true <tr valign=top><td><b><tt>PreserveOverprintSettings</tt></b><td><td><td><td>false<td><td>false<td><td>false<td><td>true<td><td>true <tr valign=top><td><b><tt>sRGBProfile</tt></b><td><td><a href="#note_0">(0)</a><td><td>()<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>StartPage</tt></b><td><td><a href="#note_0">(0)</a><td><td>1<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>SubsetFonts</tt></b><td><td><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>TransferFunctionInfo</tt></b><td><td><a href="#note_4">(4)</a><td><td>/Preserve<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>UCRandBGInfo</tt></b><td><td><td><td>/Remove<td><td>/Remove<td><td>/Remove<td><td>/Preserve<td><td>/Preserve <tr valign=top><td><b><tt>UseFlateCompression</tt></b><td><td><a href="#note_2">(2)</a><td><td>true<td><td>=<td><td>=<td><td>=<td><td>= <tr valign=top><td><b><tt>UsePrologue</tt></b><td><td><a href="#note_0">(0)</a><td><td>false<td><td>=<td><td>=<td><td>=<td><td>= </table></blockquote> <p> <a name="note_0">(note 0)</a> This parameter can be set and queried, but currently has no effect. <p> <a name="note_1">(note 1)</a> Currently, <b><tt>AutoFilterxxxImages</tt></b> doesn't examine the image to decide between JPEG and LZW or Flate compression: it always uses Flate compression. If you want to force JPEG compression, use <b><tt>-dAutoFilterxxxImages=false</tt></b>. <p> <a name="note_2">(note 2)</a> Because of Unisys's threats regarding the Welch patent, <b><tt>ps2pdf</tt></b> cannot actually use LZW compression: instead, it treats all requests for LZW compression as calling for Flate compression. Concomitantly, <tt>UseFlateCompression</tt> is treated as always on, and the value of this parameter is ignored as with note 0. <p> <a name="note_3">(note 3)</a> The <b><tt>xxxDownsampleType</tt></b> parameters can also have the value /Bicubic (a Distiller 4 feature), which is currently treated as equivalent to /Average. <p> <a name="note_4">(note 4)</a> Currently, the transfer function is always applied. If the corresponding parameter is set to <b><tt>/Preserve</tt></b>, the function setting is also copied into the PDF file. <p> <a name="note_5">(note 5)</a> Optimization (linearization) is implemented with a separate program, <b><tt>pdfopt</tt></b> <em>input.pdf</em> <em>output.pdf</em>; the <b><tt>Optimize</tt></b> parameter has no effect. <p> <a name="note_6">(note 6)</a> Currently, colors for images and shadings are left in the color space specified in the PostScript input, except for <b><tt>ConvertCMYKImagesToRGB</tt></b>; the current color in the graphics state (used for fill, stroke, text, and imagemask) is always converted to the color space specified by the current value of <b><tt>ProcessColorModel</tt></b>. The intended behavior is the same as for Acrobat Distiller, except that if <b><tt>ColorConversionStrategy</tt></b> is set to <b><tt>/UseDeviceDependentColor</tt></b>, colors are converted to the color space specified by <b><tt>ProcessColorModel</tt></b> rather than always to <b><tt>/DeviceRGB</tt></b>. <p> <a name="note_7">(note 7)</a> The default image parameter dictionary is <blockquote><b><tt> << /QFactor 0.9 /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] >> </tt></b></blockquote> <p> <a name="note_8">(note 8)</a> The printer ACS image parameter dictionary is <blockquote><b><tt> << /QFactor 0.4 /Blend 1 /ColorTransform 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> </tt></b></blockquote> <p> <a name="note_9">(note 9)</a> The prepress ACS image parameter dictionary is <blockquote><b><tt> << /QFactor 0.15 /Blend 1 /ColorTransform 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> </tt></b></blockquote> <p> <a name="note_10">(note 10)</a> The screen and ebook ACS image parameter dictionary is <blockquote><b><tt> << /QFactor 0.76 /Blend 1 /ColorTransform 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] >> </tt></b></blockquote> <p> <a name="note_11">(note 11)</a> The default, screen, and ebook settings never embed the 14 standard fonts (Courier, Helvetica, and Times families, Symbol, and ZapfDingbats). <p> <a name="note_12">(note 12)</a> <b><tt>NeverEnbed</tt></b> can include CID font names. If a CID font is substituted in <b><tt>lib/cidfmap</tt></b>, the substitute font name is used when the CID font is embedded, and the original CID font name is used when it is not embedded. <b><tt>NeverEnbed</tt></b> should always specify the original CID font name. <hr> <h2><a name="PPD"></a>Ghostscript PDF Printer Description</h2> <p> To assist with creating a PostScript file suitable for conversion to PDF, ghostscript includes <a href="../lib/ghostpdf.ppd">ghostpdf.ppd</a>, a PostScript Printer Description (PPD) file. This allows some <a href="#Options">distiller parameters</a> to be set when a PostScript file is generated. <h3>Windows XP or 2000</h3> <p> To install a "Ghostscript PDF" printer on Windows XP, select the Windows Control Panel, Printers and Faxes, Add a Printer, Local Printer, Use port FILE: (Print to File), Have Disk..., select the directory containg <a href="../lib/ghostpdf.ppd">ghostpdf.ppd</a> and <a href="../lib/ghostpdf.inf">ghostpdf.inf</a>, select "Ghostscript PDF", Replace existing driver (if asked), and answer the remaining questions appropriately. After installing, open the "Ghostscript PDF" properties, select the Device Settings tab, set "Mimimum Font Size to Download as Outline" to 0 pixels. <p> To set distiller parameters, select the "Ghostscript PDF" Printing Preferences, then the Advanced button. The PDF settings are under "Printer Features". <hr> <h2><a name="Limitations"></a>Limitations</h2> <p> <b><tt>ps2pdf</tt></b> will sometimes convert text to high-resolution bitmapped fonts rather than to embedded outline fonts. This will occur when the PostScript file uses Type 3, CIDFontType 1, or CIDFontType 4 fonts, or Type 0 fonts that reference any of these; it may also occur in some cases if the input file uses fonts with non-standard encodings, or in some other rare cases. <p> The PDF output always represents the colors of text and graphics in DeviceGray or DeviceRGB color space (or DeviceCMYK if the <b><tt>ProcessColorModel</tt></b> parameter has been set to <b><tt>/DeviceCMYK</tt></b>); all other color spaces are converted to these. However, for images, it will retain the original color space for DeviceGray, DeviceRGB, DeviceCMYK, certain CIEBased spaces, and Indexed spaces based on these. <p> <b><tt>ps2pdf</tt></b> will sometimes convert PostScript constructs to lower-level ones, even if a higher-level construct is available. For example, if the PostScript file uses <b><tt>charpath</tt></b> to set a clipping path consisting of text, <b><tt>ps2pdf</tt></b> will write the clipping path as a path in the PDF file, rather than as text, even though PDF is able to express clipping with text. This is only a performance issue, and will be improved incrementally over time. <p> Some applications, such as HIGZ, produce PostScript files that use ridiculously large coordinates. On such files, <b><tt>ps2pdf</tt></b> may cause a <b><tt>limitcheck</tt></b> error. If this occurs, try reducing the default internal resolution of 720 dpi by using the <b><tt>-r</tt></b> switch, e.g., <b><tt>ps2pdf -r300 somefile.ps</tt></b>. <p> <b><tt>ps2pdf</tt></b> ignores the PDF 1.3 (Acrobat 4.x) pdfmarks related to document content structure: <b><tt>StRoleMap</tt></b>, <b><tt>StClassMap</tt></b>, <b><tt>StPNE</tt></b>, <b><tt>StBookmarkRoot</tt></b>, <b><tt>StPush</tt></b>, <b><tt>StPop</tt></b>, <b><tt>StPopAll</tt></b>, <b><tt>StBMC</tt></b>, <b><tt>StBDC</tt></b>, <b><tt>EMC</tt></b>, <b><tt>StOBJ</tt></b>, <b><tt>StAttr</tt></b>, <b><tt>StStore</tt></b>, <b><tt>StRetrieve</tt></b>, <b><tt>NamespacePush</tt></b>, <b><tt>NamespacePop</tt></b>, and <b><tt>NI</tt></b>. While this causes some structural information to be omitted from the output file, the displayed and printed output are normally not affected. <p> <b><tt>ps2pdf</tt></b> currently has only very limited support for PDF 1.4. It writes out the blend mode, constant alpha, and text knockout graphics state parameters, and it handles images with soft masks, but it does not handle transparency groups, or soft masks in the graphics state. (Note that there is no standard way to specify any of these things in PostScript, so these statements only apply when the input file is already a PDF 1.4 file.) <p> <b><tt>ps2pdf</tt></b> provides simplified interface to Ghostscript command line. It is not possible to use <tt><b>-c</tt></b> option or pass multiple source files. For the unrestricted access to the command line parameters, use Ghostscript directly. <blockquote><b><tt> gs -q -dSAFER -dNOPAUSE -dBATCH -sOutputFile=file.pdf </tt></b><em>[more options]</em><b><tt> \<br> -sDEVICE=pdfwrite -c .setpdfwrite -f </b></tt><em>source1.ps [more files]</em> </blockquote> <hr> <h2><a name="Problems"></a>Known problems</h2> <p> Distiller parameters should only be saved by <b><tt>save</tt></b> and restored by <b><tt>restore</tt></b>, but they are also saved by <b><tt>gsave</tt></b> and restored by <b><tt>grestore</tt></b>. <p> Changing the value of the <b><tt>CompressPages</tt></b> parameter after any marks have been made on the page may cause a crash. <hr> <h2><a name="Ps2pdf_vs_AD"></a>Comparison of <b><tt>ps2pdf</tt></b> and Acrobat Distiller</h2> <p> According to users, the greatest benefit of <b><tt>ps2pdf</tt></b> is that it is more robust than Acrobat Distiller: it will process complex and difficult PostScript files that Acrobat Distiller is not able to handle. <p> For certain documents, <b><tt>ps2pdf</tt></b> is much faster than Adobe Distiller, and may be suitable for run-time conversions. George White, a heavy user of <b><tt>ps2pdf</tt></b>, remarks: <blockquote> I haven't seen a head to head comparison, but Distiller seems slower when running on what should be a faster system (for instance, Distiller on a PPC Mac vs a 25 MHz 68040 NeXT running <b><tt>ps2pdf</tt></b>), so I think this is fair -- also, one of Mark Doyle's postings indicated that Distiller was not fast enough for use as a run-time server. In contrast, I find that I can use <b><tt>ps2pdf</tt></b> as a post-processor during routine document creation. </blockquote> <p> On the other hand, there are some documents for which <b><tt>ps2pdf</tt></b> may be much slower than Acrobat Distiller. Caveat user. <p> <b><tt>ps2pdf</tt></b> usually produces output that is comparable in size to the output of Acrobat Distiller; however, it sometimes produces much larger output, especially if the input file involves pattern fills. <p> Many users report that the combination of <b><tt>ps2pdf</tt></b> with Acrobat Reader is superior to using a generic PostScript viewer (<b><tt>psview</tt></b> or <b><tt>ghostview</tt></b>), particularly for documents with many pages where the navigational support in PDF files reduces the overhead involved in navigating conventional PostScript documents. <hr> <h2><a name="Acknowledgments"></a>Acknowledgments</h2> <p> Thanks to George N. White III <<a href="mailto:aa056@chebucto.ns.ca">aa056@chebucto.ns.ca</a>> of the Ocean Sciences Division of the Bedford Institute of Oceanography in Dartmouth, Nova Scotia for extensive testing of early versions of <b><tt>ps2pdf</tt></b>, and for contributing most of this writeup. <p> Thanks to Martin Hosken of SIL International <<a href="http://www.sil.org">http://www.sil.org</a>> for help with testing <b><tt>ps2pdf</tt></b> with a wide variety of international fonts. <!-- [2.0 end contents] ==================================================== --> <!-- [3.0 begin visible trailer] =========================================== --> <hr> <p> <small>Copyright © 1996, 2000 Aladdin Enterprises. All rights reserved.</small> <p> This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of the license contained in the file LICENSE in this distribution. For more information about licensing, please refer to http://www.ghostscript.com/licensing/. For information on commercial licensing, go to http://www.artifex.com/licensing/ or contact Artifex Software, Inc., 101 Lucas Valley Road #110, San Rafael, CA 94903, U.S.A., +1(415)492-9861. <p> <small>Ghostscript version 8.15, 22 September 2004 <!-- [3.0 end visible trailer] ============================================= --> </body> </html>