xref: /plan9/sys/src/cmd/gs/doc/Use.htm (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
13ff48bf5SDavid du Colombier<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
23ff48bf5SDavid du Colombier"http://www.w3.org/TR/html4/loose.dtd">
37dd7cddfSDavid du Colombier<html>
47dd7cddfSDavid du Colombier<head>
57dd7cddfSDavid du Colombier<title>How to use Ghostscript</title>
6*593dc095SDavid du Colombier<!-- $Id: Use.htm,v 1.136 2005/10/20 19:46:23 ray Exp $ -->
77dd7cddfSDavid du Colombier<!-- Originally: use.txt -->
83ff48bf5SDavid du Colombier<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
97dd7cddfSDavid du Colombier</head>
107dd7cddfSDavid du Colombier
117dd7cddfSDavid du Colombier<body>
127dd7cddfSDavid du Colombier<!-- [1.0 begin visible header] ============================================ -->
137dd7cddfSDavid du Colombier
147dd7cddfSDavid du Colombier<!-- [1.1 begin headline] ================================================== -->
157dd7cddfSDavid du Colombier
163ff48bf5SDavid du Colombier<h1>How to use Ghostscript</h1>
177dd7cddfSDavid du Colombier
187dd7cddfSDavid du Colombier<!-- [1.1 end headline] ==================================================== -->
197dd7cddfSDavid du Colombier
207dd7cddfSDavid du Colombier<!-- [1.2 begin table of contents] ========================================= -->
217dd7cddfSDavid du Colombier
227dd7cddfSDavid du Colombier<h2>Table of contents</h2>
237dd7cddfSDavid du Colombier
247dd7cddfSDavid du Colombier<blockquote><ul>
257dd7cddfSDavid du Colombier<li><a href="#Invoking">Invoking Ghostscript</a>
267dd7cddfSDavid du Colombier<ul>
277dd7cddfSDavid du Colombier<li><a href="#Help_command">Help at the command line: <b><tt>gs -h</tt></b></a>
287dd7cddfSDavid du Colombier</ul>
297dd7cddfSDavid du Colombier<li><a href="#Output_device">Selecting an output device</a>
307dd7cddfSDavid du Colombier<ul>
31*593dc095SDavid du Colombier<li><a href="#Output_resolution">Output resolution</a>
327dd7cddfSDavid du Colombier<li><a href="#File_output">Output to files</a>
337dd7cddfSDavid du Colombier<ul>
347dd7cddfSDavid du Colombier<li><a href="#One_page_per_file">One page per file</a>
357dd7cddfSDavid du Colombier</ul>
367dd7cddfSDavid du Colombier<li><a href="#Paper_size">Choosing paper size</a>
377dd7cddfSDavid du Colombier<li><a href="#Change_default_size">Changing the installed default paper size</a>
387dd7cddfSDavid du Colombier</ul>
39*593dc095SDavid du Colombier<li><a href="#Pipes">Interacting with pipes</a>
40*593dc095SDavid du Colombier<li><a href="#PDF">Using Ghostscript with PDF files</a>
41*593dc095SDavid du Colombier<ul>
42*593dc095SDavid du Colombier<li><a href="#PDF_switches">Switches for PDF files</a>
43*593dc095SDavid du Colombier<li><a href="#PDF_problems">Problems interpreting a PDF file</a>
44*593dc095SDavid du Colombier<li><a href="#PDF_stdin">PDF files from standard input</a>
45*593dc095SDavid du Colombier</ul>
46*593dc095SDavid du Colombier
47*593dc095SDavid du Colombier<li><a href="#EPS">Using Ghostscript with EPS files</a>
48*593dc095SDavid du Colombier<li><a href="#SPOT">Using Ghostscript with overprinting and spot colors</a>
497dd7cddfSDavid du Colombier<li><a href="#Finding_files">How Ghostscript finds files</a>
507dd7cddfSDavid du Colombier<ul>
517dd7cddfSDavid du Colombier<li><a href="#PS_resources">Finding PostScript Level 2 resources</a>
527dd7cddfSDavid du Colombier<li><a href="#Font_lookup">Font lookup</a>
53*593dc095SDavid du Colombier<li><a href="#CIDFonts">CID fonts</a>
54*593dc095SDavid du Colombier<li><a href="#CIDFontSubstitution">CID font substitution</a>
557dd7cddfSDavid du Colombier<li><a href="#Temp_files">Temporary files</a>
567dd7cddfSDavid du Colombier</ul>
57*593dc095SDavid du Colombier
587dd7cddfSDavid du Colombier<li><a href="#Platforms">Notes on specific platforms</a>
597dd7cddfSDavid du Colombier<ul>
607dd7cddfSDavid du Colombier<li><a href="#Unix">Unix</a>
617dd7cddfSDavid du Colombier<li><a href="#VMS">VMS</a>
627dd7cddfSDavid du Colombier<ul>
637dd7cddfSDavid du Colombier<li><a href="#VMS_X_Windows">Using X Windows on VMS</a>
647dd7cddfSDavid du Colombier</ul>
657dd7cddfSDavid du Colombier<li><a href="#MS_Windows">MS Windows</a>
667dd7cddfSDavid du Colombier<li><a href="#X_Windows">X Windows</a>
677dd7cddfSDavid du Colombier<ul>
687dd7cddfSDavid du Colombier<li><a href="#X_resources">X resources</a>
697dd7cddfSDavid du Colombier<li><a href="#X_server_bugs">Working around bugs in X servers</a>
707dd7cddfSDavid du Colombier<li><a href="#X_fonts">X fonts</a>
717dd7cddfSDavid du Colombier<li><a href="#GS_fonts_as_X_fonts">Using Ghostscript fonts on X displays</a>
727dd7cddfSDavid du Colombier<li><a href="#X_device_parameters">X device parameters</a>
737dd7cddfSDavid du Colombier</ul>
747dd7cddfSDavid du Colombier<li><a href="#SCO_Unix">SCO Unix</a>
757dd7cddfSDavid du Colombier</ul>
76*593dc095SDavid du Colombier
77*593dc095SDavid du Colombier<li><a href="#Options">Command line options</a>
787dd7cddfSDavid du Colombier<ul>
797dd7cddfSDavid du Colombier<li><a href="#General_switches">General switches</a>
807dd7cddfSDavid du Colombier<ul>
817dd7cddfSDavid du Colombier<li><a href="#Input_control">Input control</a>
827dd7cddfSDavid du Colombier<li><a href="#File_searching">File searching</a>
837dd7cddfSDavid du Colombier<li><a href="#Parameters">Setting parameters</a>
847dd7cddfSDavid du Colombier<li><a href="#Quiet">Suppress messages</a>
857dd7cddfSDavid du Colombier</ul>
867dd7cddfSDavid du Colombier<li><a href="#Parameter_switches">Parameter switches (<b><tt>-d</tt></b> and <b><tt>-s</tt></b>)</a>
877dd7cddfSDavid du Colombier<ul>
887dd7cddfSDavid du Colombier<li><a href="#Rendering_parameters">Rendering parameters</a>
897dd7cddfSDavid du Colombier<li><a href="#Page_parameters">Page parameters</a>
907dd7cddfSDavid du Colombier<li><a href="#Font_related_parameters">Font-related parameters</a>
91*593dc095SDavid du Colombier<li><a href="#Resource_related_parameters">Resource-related parameters</a>
927dd7cddfSDavid du Colombier<li><a href="#Interaction_related_parameters">Interaction-related parameters</a>
937dd7cddfSDavid du Colombier<li><a href="#Output_selection_parameters">Device and output selection parameters</a>
94*593dc095SDavid du Colombier<li><a href="#EPS_parameters">EPS parameters</a>
957dd7cddfSDavid du Colombier<li><a href="#Other_parameters">Other parameters</a>
967dd7cddfSDavid du Colombier</ul>
977dd7cddfSDavid du Colombier</ul>
987dd7cddfSDavid du Colombier<li><a href="#Improving_performance">Improving performance</a>
99*593dc095SDavid du Colombier<li><a href="#Environment_variables">Summary of environment variables</a>
100*593dc095SDavid du Colombier
1017dd7cddfSDavid du Colombier<li><a href="#Debugging">Debugging</a>
102*593dc095SDavid du Colombier<ul>
103*593dc095SDavid du Colombier<li><a href="#Debug_switches">Debug Switches</a>
104*593dc095SDavid du Colombier<li><a href="#Visual_trace">Visual Trace</a>
105*593dc095SDavid du Colombier</ul>
1067dd7cddfSDavid du Colombier<li><a href="#Known_paper_sizes">Appendix: Paper sizes known to Ghostscript</a>
1077dd7cddfSDavid du Colombier<li><a href="#X_font_mappings">Appendix: X default font mappings</a>
1087dd7cddfSDavid du Colombier<ul>
1097dd7cddfSDavid du Colombier<li><a href="#Standard_X_server_fonts">Standard X servers</a>
1107dd7cddfSDavid du Colombier<ul>
1117dd7cddfSDavid du Colombier<li><a href="#X_regular_fonts">Regular fonts</a>
1127dd7cddfSDavid du Colombier<li><a href="#X_symbol_fonts">Symbol fonts</a>
1137dd7cddfSDavid du Colombier<li><a href="#X_dingbat_fonts">Dingbat fonts</a>
1147dd7cddfSDavid du Colombier</ul>
1157dd7cddfSDavid du Colombier<li><a href="#OpenWindows_fonts">Sun OpenWindows</a>
1167dd7cddfSDavid du Colombier</ul>
117*593dc095SDavid du Colombier<li><a href="#FAPI_run">Appendix: Running Ghostscript with 3d party font renderers</a>
1187dd7cddfSDavid du Colombier</ul></blockquote>
1197dd7cddfSDavid du Colombier
1207dd7cddfSDavid du Colombier<!-- [1.2 end table of contents] =========================================== -->
1217dd7cddfSDavid du Colombier
1227dd7cddfSDavid du Colombier<!-- [1.3 begin hint] ====================================================== -->
1237dd7cddfSDavid du Colombier
1247dd7cddfSDavid du Colombier<p>For other information, see the <a href="Readme.htm">Ghostscript
125*593dc095SDavid du Colombieroverview</a> and, if necessary, how to
1267dd7cddfSDavid du Colombier<a href="Install.htm">install Ghostscript</a>.
1277dd7cddfSDavid du Colombier
1287dd7cddfSDavid du Colombier<!-- [1.3 end hint] ======================================================== -->
1297dd7cddfSDavid du Colombier
1307dd7cddfSDavid du Colombier<hr>
1317dd7cddfSDavid du Colombier
1327dd7cddfSDavid du Colombier<!-- [1.0 end visible header] ============================================== -->
1337dd7cddfSDavid du Colombier
1347dd7cddfSDavid du Colombier<!-- [2.0 begin contents] ================================================== -->
1357dd7cddfSDavid du Colombier
1363ff48bf5SDavid du Colombier<h2><a name="Invoking"></a>Invoking Ghostscript</h2>
1377dd7cddfSDavid du Colombier
138*593dc095SDavid du Colombier<p>This document describes how to use the command line Ghostscript client.
139*593dc095SDavid du ColombierGhostscript is also used as a general engine inside other applications (for viewing files for example).
140*593dc095SDavid du ColombierPlease refer to the documentation for those applications for using Ghostscript in other contexts.
141*593dc095SDavid du Colombier
1427dd7cddfSDavid du Colombier<p><a name="Command_line"></a> The command line to invoke Ghostscript is
1437dd7cddfSDavid du Colombieressentially the same on all systems, although the name of the executable
1447dd7cddfSDavid du Colombierprogram itself may differ among systems.  For instance, to invoke
145*593dc095SDavid du ColombierGhostscript on unix-like systems type:
1467dd7cddfSDavid du Colombier
1477dd7cddfSDavid du Colombier<blockquote>
148*593dc095SDavid du Colombier        <pre><b><tt>gs</tt></b> [options] {filename 1} ... [options] {filename <em>N</em>} ...
149*593dc095SDavid du Colombier</pre></blockquote>
1507dd7cddfSDavid du Colombier
151*593dc095SDavid du Colombier<p>Here are some basic examples. The details of how these work are described below.
1527dd7cddfSDavid du Colombier
153*593dc095SDavid du Colombier<p>To view a file:
154*593dc095SDavid du Colombier<blockquote><pre>gs -dSAFER -dBATCH document.pdf</pre></blockquote>
155*593dc095SDavid du ColombierYou'll be prompted to press <em>return</em> between pages.
156*593dc095SDavid du Colombier
157*593dc095SDavid du Colombier<p>To convert a figure to an image file:
158*593dc095SDavid du Colombier<blockquote><pre>gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 \
159*593dc095SDavid du Colombier    -sOutputFile=tiger.png tiger.eps</pre></blockquote>
160*593dc095SDavid du Colombier
161*593dc095SDavid du Colombier<p>To render the same image at 300 dpi:
162*593dc095SDavid du Colombier<blockquote><pre>gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -r300 \
163*593dc095SDavid du Colombier                -sOutputFile=tiger_300.png tiger.eps
164*593dc095SDavid du Colombier</pre></blockquote>
165*593dc095SDavid du Colombier
166*593dc095SDavid du Colombier<p>To render a figure in grayscale:
167*593dc095SDavid du Colombier<blockquote><pre>gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -sOutputFile=figure.png figure.pdf
168*593dc095SDavid du Colombier</pre></blockquote>
169*593dc095SDavid du Colombier
170*593dc095SDavid du Colombier<p>To rasterize a whole document:
171*593dc095SDavid du Colombier<blockquote><pre>gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pgmraw -r150 \
172*593dc095SDavid du Colombier                -dTextAlphaBits=4 -sOutputFile='paper-%00d.pgm' paper.ps</pre></blockquote>
173*593dc095SDavid du Colombier
174*593dc095SDavid du Colombier<p>There are also a number of utility scripts for common
175*593dc095SDavid du Colombier
176*593dc095SDavid du Colombierto convert a PostScript document to PDF:
177*593dc095SDavid du Colombier<blockquote><pre>ps2pdf file.ps</pre></blockquote>
178*593dc095SDavid du ColombierThe output is saved as file.pdf.
179*593dc095SDavid du Colombier
180*593dc095SDavid du Colombier<p>There are other utility scripts besides <tt>ps2pdf</tt>, including <tt>pdf2ps</tt>, <tt>ps2epsi</tt>, <tt>pdf2dsc</tt>, <tt>ps2ascii</tt>,
181*593dc095SDavid du Colombier<tt>ps2ps</tt> and <tt>ps2ps2</tt>. These just call Ghostscript with the appropriate
182*593dc095SDavid du Colombier(if complicated) set of options. You can use the 'ps2' set with eps files.
1837dd7cddfSDavid du Colombier
1847dd7cddfSDavid du Colombier<p>
1857dd7cddfSDavid du ColombierGhostscript is capable of interpreting PostScript, encapsulated PostScript
186*593dc095SDavid du Colombier(EPS), DOS EPS (EPSF), and Adobe Portable Document Format (PDF).  The interpreter reads and executes the files in sequence, using the method described under "<a href="#File_searching">File searching</a>" to find them.
187*593dc095SDavid du Colombier
188*593dc095SDavid du Colombier<p>The interpreter runs in interactive mode by default. After processing the files given on the command line (if any) it reads further lines of PostScript language commands from the primary input stream, normally the keyboard, interpreting each line separately. To quit the interpreter, type "<b><tt>quit</tt></b>". The <tt>-dBATCH -dNOPAUSE</tt> options in the examples above disable the interactive prompting. The interpreter also quits gracefully if it encounters end-of-file or control-C.
1897dd7cddfSDavid du Colombier
1907dd7cddfSDavid du Colombier<p>
191*593dc095SDavid du ColombierThe interpreter recognizes many options. An option may appear anywhere in the command line, and applies to all files named after it on the line. Many of them include "<b><tt>=</tt></b>"
192*593dc095SDavid du Colombierfollowed by a parameter. The most important are described in detail here. Please see the reference
193*593dc095SDavid du Colombier sections on <a href="#Options">options</a> and <a href="Devices.htm">devices</a> for a more complete listing.
1947dd7cddfSDavid du Colombier
1953ff48bf5SDavid du Colombier<h3><a name="Help_command"></a>Help at the command line: <b><tt>gs -h</tt></b></h3>
1967dd7cddfSDavid du Colombier
1977dd7cddfSDavid du Colombier<p>
1987dd7cddfSDavid du ColombierYou can get a brief help message by invoking Ghostscript with the
1997dd7cddfSDavid du Colombier<b><tt>-h</tt></b> or <b><tt>-?</tt></b> switch, like this:
2007dd7cddfSDavid du Colombier
201*593dc095SDavid du Colombier<blockquote><pre>
202*593dc095SDavid du Colombiergs -h
2037dd7cddfSDavid du Colombiergs -?
204*593dc095SDavid du Colombier</pre></blockquote>
2057dd7cddfSDavid du Colombier
2067dd7cddfSDavid du Colombier<p>
207*593dc095SDavid du ColombierThe message shows for that version of the Ghostscript executable:
2087dd7cddfSDavid du Colombier
2097dd7cddfSDavid du Colombier<ul>
210*593dc095SDavid du Colombier<li>the version and release information
211*593dc095SDavid du Colombier<li>the general format of the command line
212*593dc095SDavid du Colombier<li>a few of the most useful options
2137dd7cddfSDavid du Colombier<li>the formats it can interpret
214*593dc095SDavid du Colombier<li>the available output devices
215*593dc095SDavid du Colombier<li>the search path
216*593dc095SDavid du Colombier<li>the bug report address
2177dd7cddfSDavid du Colombier</ul>
2187dd7cddfSDavid du Colombier
2193ff48bf5SDavid du Colombier<p>
220*593dc095SDavid du ColombierOn other systems the executable may have a different name:
2213ff48bf5SDavid du Colombier
222*593dc095SDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0>
223*593dc095SDavid du Colombier<tr bgcolor="#CCCC00">
224*593dc095SDavid du Colombier        <th align=left>System
225*593dc095SDavid du Colombier        <th>&nbsp;&nbsp;
226*593dc095SDavid du Colombier        <th align=left>invocation name
227*593dc095SDavid du Colombier<tr>    <td>Unix
228*593dc095SDavid du Colombier        <td>&nbsp;<td><b><tt>gs</tt></b>
229*593dc095SDavid du Colombier<tr>    <td>VMS
230*593dc095SDavid du Colombier        <td>&nbsp;<td><b><tt>gs</tt></b>
231*593dc095SDavid du Colombier<tr>    <td>MS Windows 95 and later
232*593dc095SDavid du Colombier        <td>&nbsp;<td><b><tt>gswin32c</tt></b>
233*593dc095SDavid du Colombier<tr>    <td>MS Windows 3.1/Win32s
234*593dc095SDavid du Colombier        <td>&nbsp;<td><b><tt>gswin32</tt></b>
235*593dc095SDavid du Colombier<tr>    <td>OS/2
236*593dc095SDavid du Colombier        <td>&nbsp;<td><b><tt>gsos2</tt></b>
237*593dc095SDavid du Colombier</table></blockquote>
2383ff48bf5SDavid du Colombier
2397dd7cddfSDavid du Colombier
2403ff48bf5SDavid du Colombier<h2><a name="Output_device"></a>Selecting an output device</h2>
2417dd7cddfSDavid du Colombier
2427dd7cddfSDavid du Colombier<p>
243*593dc095SDavid du ColombierGhostscript has a notion of 'output devices' which handle saving or displaying the results in a particular format. Ghostscript comes with a diverse variety of such devices supporting vector and raster file output, screen display, driving various printers and communicating with other applications.
2447dd7cddfSDavid du Colombier
2457dd7cddfSDavid du Colombier<p>
246*593dc095SDavid du ColombierThe command line option '<tt>-sDEVICE=</tt><em>device</em>' selects which output device Ghostscript should use. If this option isn't given the default device (usually a display device) is used. Ghostscript's built-in help message (<tt>gs&nbsp;-h</tt>) lists
247*593dc095SDavid du Colombierthe available output devices. For complete description of the devices distributed with Ghostscript and their options, please see the <a href="Devices.htm">devices section</a> of the documentation.
248*593dc095SDavid du Colombier
249*593dc095SDavid du Colombier<p><a name="Device_output"></a>
2507dd7cddfSDavid du ColombierNote that this switch must precede the name of the first input file, and
2517dd7cddfSDavid du Colombieronly its first use has any effect.  For example, for printer output in a
2527dd7cddfSDavid du Colombierconfiguration that includes an Epson printer driver, instead of just
253*593dc095SDavid du Colombier<tt>'gs&nbsp;myfile.ps'</tt> you might use
2547dd7cddfSDavid du Colombier
2557dd7cddfSDavid du Colombier<blockquote>
2567dd7cddfSDavid du Colombier        <b><tt>gs -sDEVICE=epson myfile.ps</tt></b>
2577dd7cddfSDavid du Colombier</blockquote>
2587dd7cddfSDavid du Colombier
259*593dc095SDavid du Colombier<p><a name="GS_DEVICE"></a>
260*593dc095SDavid du ColombierThe output device can also be set through the <tt>GS_DEVICE</tt> environment variable.
2617dd7cddfSDavid du Colombier
262*593dc095SDavid du Colombier<p>
263*593dc095SDavid du ColombierOnce you invoke Ghostscript
264*593dc095SDavid du Colombieryou can also find out what devices are available by typing
265*593dc095SDavid du Colombier'<tt>devicenames&nbsp;==</tt>' at the interactive prompt.
266*593dc095SDavid du ColombierYou can set the output device and process a file from the interactive prompt as well:
267*593dc095SDavid du Colombier
268*593dc095SDavid du Colombier
269*593dc095SDavid du Colombier<blockquote><pre>
270*593dc095SDavid du Colombier(epson) selectdevice
2717dd7cddfSDavid du Colombier(myfile.ps) run
272*593dc095SDavid du Colombier</pre></blockquote>
2737dd7cddfSDavid du Colombier
2747dd7cddfSDavid du ColombierAll output then goes to the Epson printer instead of the display until you
2757dd7cddfSDavid du Colombierdo something to change devices.  You can switch devices at any time by
276*593dc095SDavid du Colombierusing the <tt>selectdevice</tt> procedure, for
2777dd7cddfSDavid du Colombierinstance like one of these:
2787dd7cddfSDavid du Colombier
279*593dc095SDavid du Colombier<blockquote><pre>
280*593dc095SDavid du Colombier(x11alpha) selectdevice
2817dd7cddfSDavid du Colombier(epson) selectdevice
282*593dc095SDavid du Colombier</pre></blockquote>
2837dd7cddfSDavid du Colombier
284*593dc095SDavid du Colombier<h3><a name="Output_resolution"></a>Output resolution</h3>
2857dd7cddfSDavid du Colombier
2867dd7cddfSDavid du Colombier<p>
2877dd7cddfSDavid du ColombierSome printers can print at several different resolutions, letting you
2887dd7cddfSDavid du Colombierbalance resolution against printing speed.  To select the resolution on
2897dd7cddfSDavid du Colombiersuch a printer, use the <b><tt>-r</tt></b> switch:
2907dd7cddfSDavid du Colombier
2917dd7cddfSDavid du Colombier<blockquote>
2927dd7cddfSDavid du Colombier        <b><tt>gs -sDEVICE=</tt></b><em>printer</em><b><tt> -r</tt></b><em>XRES</em><b><tt>x</tt></b><em>YRES</em>
2937dd7cddfSDavid du Colombier</blockquote>
2947dd7cddfSDavid du Colombier
295*593dc095SDavid du Colombierwhere <em>XRES</em> and <em>YRES</em> are the requested number of dots (or pixels) per inch. Where the two resolutions are same, as is the common case, you can simply use <tt>-r</tt><em>res</em>.
2967dd7cddfSDavid du Colombier
297*593dc095SDavid du Colombier<p>
298*593dc095SDavid du ColombierThe <tt>-r</tt> option is also useful for controlling the density of pixels when rasterizing to an image file. It is used this way in the examples at the beginning of this document.
2997dd7cddfSDavid du Colombier
3003ff48bf5SDavid du Colombier<h3><a name="File_output"></a>Output to files</h3>
3017dd7cddfSDavid du Colombier
3027dd7cddfSDavid du Colombier<p>
303*593dc095SDavid du ColombierGhostscript also allows you to control where it sends its output. With a display device this isn't necessary as the device handles presenting the output on screen internally. Some specialized printer drivers operate this way as well, but most devices are general and need to be directed to a particular file or printer.
304*593dc095SDavid du Colombier
305*593dc095SDavid du Colombier<p>
306*593dc095SDavid du ColombierTo send the output to a file, use the <tt>-sOutputFile=</tt> switch.
307*593dc095SDavid du ColombierFor instance, to direct all output into the file <tt>ABC.xyz</tt>, use
3087dd7cddfSDavid du Colombier
3097dd7cddfSDavid du Colombier<blockquote><b><tt>
3107dd7cddfSDavid du Colombiergs -sOutputFile=ABC.xyz
3117dd7cddfSDavid du Colombier</tt></b></blockquote>
3127dd7cddfSDavid du Colombier
3137dd7cddfSDavid du Colombier<p>
314*593dc095SDavid du ColombierWhen printing on MS Windows systems, output normally goes directly to the printer, <tt>PRN</tt>. On Unix and VMS systems it normally goes to a temporary file which is sent to the printer in a separate step. When using Ghostscript as a file rasterizer (converting PostScript or PDF to a raster image format) you will of course want to specify an appropriately named file for the output.
3157dd7cddfSDavid du Colombier
3167dd7cddfSDavid du Colombier<p>
317*593dc095SDavid du ColombierGhostscript also accepts the special filename '<tt>-</tt>' which indicates the output should be written to standard output (the command shell).
3187dd7cddfSDavid du Colombier
319*593dc095SDavid du Colombier<p>
320*593dc095SDavid du ColombierBe aware that filenames beginning with the character <tt>%</tt> have a special meaning in PostScript. If you need to specify a file name that actually
321*593dc095SDavid du Colombierbegins with <tt>%</tt>, you must prepend the <tt>%os%</tt> filedevice explicitly. For example to output to a file named <tt>%abc</tt>, you need to specify
322*593dc095SDavid du Colombier
323*593dc095SDavid du Colombier<blockquote>
324*593dc095SDavid du Colombier<b><tt>gs -sOutputFile=%os%%abc</tt></b>
325*593dc095SDavid du Colombier</blockquote>
326*593dc095SDavid du Colombier
327*593dc095SDavid du ColombierPlease see <a href="Language.htm">Ghostscript and the PostScript Language</a> and the PostScript Language Reference Manual for more details on <tt>%</tt> and filedevices.
328*593dc095SDavid du Colombier
329*593dc095SDavid du Colombier<p>
330*593dc095SDavid du ColombierNote that on MS Windows systems, the <b><tt>%</tt></b> character also has a special meaning for the command processor (shell), so you will have to double it:
331*593dc095SDavid du Colombier
332*593dc095SDavid du Colombier<blockquote>
333*593dc095SDavid du Colombier<b><tt>gs -sOutputFile=%%os%%%%abc</tt></b> (on MS Windows)
334*593dc095SDavid du Colombier</blockquote>
3357dd7cddfSDavid du Colombier
3363ff48bf5SDavid du Colombier<h4><a name="One_page_per_file"></a>One page per file</h4>
3377dd7cddfSDavid du Colombier
3387dd7cddfSDavid du Colombier<p>
339*593dc095SDavid du ColombierSpecifying a single output file works fine for printing and rasterizing
340*593dc095SDavid du Colombierfigures, but sometimes you want images of each page of a multi-page
341*593dc095SDavid du Colombierdocument. You can tell Ghostscript to put each page of output in a
342*593dc095SDavid du Colombierseries of similarly named files. To do this place a template
343*593dc095SDavid du Colombier'<tt>%d</tt>' in the filename which Ghostscript will replace with the
344*593dc095SDavid du Colombierpage number.
3457dd7cddfSDavid du Colombier
3467dd7cddfSDavid du Colombier<p>
347*593dc095SDavid du ColombierYou can also control the number of digits used in the file name:
3487dd7cddfSDavid du Colombier
349*593dc095SDavid du Colombier<blockquote><dl>
350*593dc095SDavid du Colombier<dt><b><tt>-sOutputFile=ABC-%d.png</tt></b>
351*593dc095SDavid du Colombier<dd>produces '<tt>ABC-1.png</tt>', ... , '<tt>ABC-10.png</tt>', ...<p>
352*593dc095SDavid du Colombier<dt><b><tt>-sOutputFile=ABC-%03d.pgm</tt></b>
353*593dc095SDavid du Colombier<dd>produces '<tt>ABC-001.pgm</tt>', ... , '<tt>ABC-010.pgm</tt>', ...<p>
354*593dc095SDavid du Colombier<dt><b><tt>-sOutputFile=ABC_p%04d.tiff</tt></b>
355*593dc095SDavid du Colombier<dd>produces '<tt>ABC_p0001.tiff</tt>', ... , '<tt>ABC_p0510.tiff</tt>', ... , '<tt>ABC_p5238.tiff</tt>'<p>
356*593dc095SDavid du Colombier</dl></blockquote>
357*593dc095SDavid du Colombier
358*593dc095SDavid du ColombierGenerally <tt>%03d</tt> is the best option for normal documents.
359*593dc095SDavid du Colombier
360*593dc095SDavid du Colombier<p>
361*593dc095SDavid du ColombierNote however that this features is not supported by all devices; in particular
362*593dc095SDavid du Colombierit does not work with document-oriented output devices like <tt>pdfwrite</tt> and
363*593dc095SDavid du Colombier<tt>pswrite</tt>. See the <tt>-dFirstPage</tt> and <tt>-dLastPage</tt> switches
364*593dc095SDavid du Colombier<a href="#PDF_switches">below</a> for a way to extract single pdf pages.
365*593dc095SDavid du Colombier
366*593dc095SDavid du Colombier<p>
367*593dc095SDavid du ColombierAs noted above, on MS Windows systems, you will have to double the
368*593dc095SDavid du Colombier<tt>%</tt> character, e.g.,
369*593dc095SDavid du Colombier
370*593dc095SDavid du Colombier<blockquote><tt><b>
3717dd7cddfSDavid du Colombiergs -sOutputFile=ABC%%03d.xyz
372*593dc095SDavid du Colombier</b></tt></blockquote>
3737dd7cddfSDavid du Colombier
3747dd7cddfSDavid du Colombier
3753ff48bf5SDavid du Colombier<h3><a name="Paper_size"></a>Choosing paper size</h3>
3767dd7cddfSDavid du Colombier
3777dd7cddfSDavid du Colombier<p>
3787dd7cddfSDavid du ColombierGhostscript is distributed configured to use U.S. letter paper as its
3793ff48bf5SDavid du Colombierdefault page size.  There are two ways to select other paper sizes from the
3803ff48bf5SDavid du Colombiercommand line:
3813ff48bf5SDavid du Colombier
3823ff48bf5SDavid du Colombier<ul>
3833ff48bf5SDavid du Colombier
3843ff48bf5SDavid du Colombier<li>
3853ff48bf5SDavid du ColombierIf the desired paper size is listed in the section on <a
3863ff48bf5SDavid du Colombierhref="#Known_paper_sizes">paper sizes known to Ghostscript</a> below, you
3873ff48bf5SDavid du Colombiercan select it as the default paper size for a single invocation of
3883ff48bf5SDavid du ColombierGhostscript by using the <b><tt>-sPAPERSIZE=</tt></b> switch, for instance
3897dd7cddfSDavid du Colombier
3907dd7cddfSDavid du Colombier<blockquote><b><tt>
3917dd7cddfSDavid du Colombier-sPAPERSIZE=a4<br>
3927dd7cddfSDavid du Colombier-sPAPERSIZE=legal
3937dd7cddfSDavid du Colombier</tt></b></blockquote>
3947dd7cddfSDavid du Colombier
3953ff48bf5SDavid du Colombier<li>
396*593dc095SDavid du ColombierOtherwise you can set the page size using the
3973ff48bf5SDavid du Colombierpair of switches
3983ff48bf5SDavid du Colombier
3993ff48bf5SDavid du Colombier<blockquote>
4003ff48bf5SDavid du Colombier<b><tt>-dDEVICEWIDTHPOINTS=</tt></b><em>w</em>
4013ff48bf5SDavid du Colombier<b><tt>-dDEVICEHEIGHTPOINTS=</tt></b><em>h</em>
4023ff48bf5SDavid du Colombier</blockquote>
4033ff48bf5SDavid du Colombier
404*593dc095SDavid du ColombierWhere <em>w</em> be the desired paper width and <em>h</em> be the
405*593dc095SDavid du Colombierdesired paper height in <em>points</em> (units of 1/72 of an inch).
4063ff48bf5SDavid du Colombier</ul>
4073ff48bf5SDavid du Colombier
4087dd7cddfSDavid du Colombier<p>
4097dd7cddfSDavid du ColombierIndividual documents can (and often do) specify a paper size, which takes
4107dd7cddfSDavid du Colombierprecedence over the default size.  To force a specific paper size and
4117dd7cddfSDavid du Colombierignore the paper size specified in the document, select a paper size as
4127dd7cddfSDavid du Colombierjust described, and also include the
4137dd7cddfSDavid du Colombier<a href="#FIXEDMEDIA"><b><tt>-dFIXEDMEDIA</tt></b> switch</a> on the
4147dd7cddfSDavid du Colombiercommand line.
4157dd7cddfSDavid du Colombier
416*593dc095SDavid du Colombier<p>
417*593dc095SDavid du ColombierThe default set of paper sizes will be included in the <b><tt>currentpagedevice</tt></b>
418*593dc095SDavid du Colombierin the <b><tt>InputAttributes</tt></b> dictionary with each paper size as
419*593dc095SDavid du Colombierone of the entries. The last entry in the dictionary (which has numeric keys)
420*593dc095SDavid du Colombieris a non-standard (Ghostscript extension) type of PageSize where the array
421*593dc095SDavid du Colombierhas four elements rather than the standard two elements. This four element
422*593dc095SDavid du Colombierarray represents a page size range where the first two elements are the lower
423*593dc095SDavid du Colombierbound of the range and the second two are the upper bound. By default these
424*593dc095SDavid du Colombierare [0, 0] for the lower bound and [16#fffff, 16#fffff] for the upper bound.
425*593dc095SDavid du Colombier<br>
426*593dc095SDavid du ColombierThe range type of PageSize is intended to allow flexible page size sepcification
427*593dc095SDavid du Colombierfor non-printer file formats such as JPEG, PNG, TIFF, EPS, ...
428*593dc095SDavid du Colombier<br>
429*593dc095SDavid du ColombierFor actual printers, either the entire <b><tt>InputAttributes</tt></b> dictionary
430*593dc095SDavid du Colombiershould be replaced or the range type entry should not be included. To simplify
431*593dc095SDavid du Colombierusing the default page sizes in the <b><tt>InputAttributes</tt></b> dictionary,
432*593dc095SDavid du Colombierthe command line option <b><tt>-dNORANGEPAGESIZE</tt></b> can be used. Using
433*593dc095SDavid du Colombierthis option will result in automatic rotation of the document page if the requested
434*593dc095SDavid du Colombierpage size matches one of the default page sizes.
435*593dc095SDavid du Colombier
4363ff48bf5SDavid du Colombier<h3><a name="Change_default_size"></a>Changing the installed default paper size</h3>
4377dd7cddfSDavid du Colombier
4387dd7cddfSDavid du Colombier<p>
439*593dc095SDavid du ColombierYou can change the installed default paper size on an installed version of Ghostscript, by editing the initialization file <b><tt>gs_init.ps</tt></b>.
440*593dc095SDavid du ColombierThis file is usually in the <tt>lib</tt> directory somewhere in the search path. See the section on <a href="#Finding_files">finding files</a> for details.
4417dd7cddfSDavid du Colombier
4427dd7cddfSDavid du Colombier<p>
443*593dc095SDavid du ColombierFind the line
444*593dc095SDavid du Colombier
445*593dc095SDavid du Colombier<blockquote><pre>
446*593dc095SDavid du Colombier% /DEFAULTPAPERSIZE (a4) def
447*593dc095SDavid du Colombier</pre></blockquote>
448*593dc095SDavid du Colombier
449*593dc095SDavid du Colombier<p>
450*593dc095SDavid du ColombierThen to make A4 the default paper size, uncomment the line to change
4517dd7cddfSDavid du Colombierthis to
4527dd7cddfSDavid du Colombier
453*593dc095SDavid du Colombier<blockquote><pre>
454*593dc095SDavid du Colombier/DEFAULTPAPERSIZE (a4) def
455*593dc095SDavid du Colombier</pre></blockquote>
4567dd7cddfSDavid du Colombier
4577dd7cddfSDavid du Colombier<p>
458*593dc095SDavid du ColombierFor <tt>a4</tt> you can substitute any
4597dd7cddfSDavid du Colombier<a href="#Known_paper_sizes">paper size Ghostscript knows</a>.
4607dd7cddfSDavid du Colombier
461*593dc095SDavid du Colombier<p>
462*593dc095SDavid du ColombierThis supecedes the previous method of uncommenting the line
463*593dc095SDavid du Colombier<b><tt>% (a4) ...</tt></b>.
464*593dc095SDavid du Colombier
465*593dc095SDavid du Colombier<p>
466*593dc095SDavid du ColombierSometimes the initialization files are compiled into Ghostscript and cannot be changed.
467*593dc095SDavid du Colombier
468*593dc095SDavid du Colombier<h2><a name="Pipes"></a>Interacting with pipes</h2>
469*593dc095SDavid du Colombier
470*593dc095SDavid du Colombier<p>
471*593dc095SDavid du ColombierAs noted above, input files are normally specified on the command
472*593dc095SDavid du Colombierline.  However, one can also "pipe" input into Ghostscript from another
473*593dc095SDavid du Colombierprogram by using the special file name '<b><tt>-</tt></b>' which is interpreted as standard input. Examples:
474*593dc095SDavid du Colombier
475*593dc095SDavid du Colombier<blockquote>
476*593dc095SDavid du Colombier{<em>some program producing ps</em>} <b><tt>| gs</tt></b> [options] <b><tt>-</tt></b>
477*593dc095SDavid du Colombier<br>
478*593dc095SDavid du Colombier<tt>zcat paper.ps.gz</tt> <b><tt>| gs</tt></b> <b><tt>-</tt></b>
479*593dc095SDavid du Colombier</blockquote>
480*593dc095SDavid du Colombier
481*593dc095SDavid du Colombier<p>
482*593dc095SDavid du Colombier<em>Ghostscript cannot read PDF files from standard input or a pipe because the PDF language inherently requires random access to the file. Thus '<tt>-</tt>' only works with PostScript documents.</em>
483*593dc095SDavid du Colombier
484*593dc095SDavid du Colombier<p>
485*593dc095SDavid du ColombierWhen Ghostscript finishes reading from the pipe, it quits rather than
486*593dc095SDavid du Colombiergoing into interactive mode.  Because of this, options and files after the '<tt>-</tt>' in the command line will be ignored.
487*593dc095SDavid du Colombier
488*593dc095SDavid du Colombier<p>
489*593dc095SDavid du ColombierOn Unix and MS Windows systems you can send output to a pipe in the same way.  For example, to pipe the output to <tt>lpr</tt>, use the command
490*593dc095SDavid du Colombier
491*593dc095SDavid du Colombier<blockquote><tt>
492*593dc095SDavid du Colombier        <b>gs -q -sOutputFile=- |</b> lpr
493*593dc095SDavid du Colombier</tt></blockquote>
494*593dc095SDavid du Colombier
495*593dc095SDavid du Colombier<p>
496*593dc095SDavid du ColombierIn this case you must also use the <a href="#Quiet"><b><tt>-q</tt></b>
497*593dc095SDavid du Colombierswitch</a> to prevent Ghostscript from writing messages to standard output
498*593dc095SDavid du Colombierwhich become mixed with the intended output stream.
499*593dc095SDavid du Colombier
500*593dc095SDavid du Colombier<p>
501*593dc095SDavid du ColombierSimilar results can be obtained with the <tt>%stdout</tt> and <tt>%pipe%</tt> filedevices. The example above would become
502*593dc095SDavid du Colombier
503*593dc095SDavid du Colombier<blockquote><tt>
504*593dc095SDavid du Colombier        <b>gs -sOutputFile=%stdout -q |</b> lpr
505*593dc095SDavid du Colombier</tt></blockquote>
506*593dc095SDavid du Colombieror
507*593dc095SDavid du Colombier<blockquote><tt>
508*593dc095SDavid du Colombier        <b>gs -sOutputFile=%pipe%</b>lpr
509*593dc095SDavid du Colombier</tt></blockquote>
510*593dc095SDavid du Colombier
511*593dc095SDavid du Colombier(again, doubling the <b><tt>%</tt></b> character on MS Windows systems.)
512*593dc095SDavid du Colombier
513*593dc095SDavid du Colombier<p>
514*593dc095SDavid du ColombierIn the last case, <tt>-q</tt> isn't necessary since Ghostscript handles the pipe itself and messages sent to stdout will be printed as normal.
515*593dc095SDavid du Colombier
516*593dc095SDavid du Colombier<h2><a name="PDF"></a>Using Ghostscript with PDF files</h2>
517*593dc095SDavid du Colombier
518*593dc095SDavid du Colombier<p>
519*593dc095SDavid du ColombierGhostscript is normally built to interpret both PostScript and PDF files, examining each file to determine automatically whether its contents are PDF or PostScript.  All the normal switches and procedures for interpreting PostScript files also apply to PDF files, with a few exceptions. In addition, the
520*593dc095SDavid du Colombier<tt>pdf2ps</tt> utility uses Ghostscript to convert PDF to (Level 2) PostScript.
521*593dc095SDavid du Colombier
522*593dc095SDavid du Colombier<h3><a name="PDF_switches"></a>Switches for PDF files</h3>
523*593dc095SDavid du Colombier
524*593dc095SDavid du Colombier<p>Here are some command line options specific to PDF
525*593dc095SDavid du Colombier
526*593dc095SDavid du Colombier<dl>
527*593dc095SDavid du Colombier<dt><b><tt>-dFirstPage=</tt></b><em>pagenumber</em>
528*593dc095SDavid du Colombier<dd>Begins interpreting on the designated page of the document.
529*593dc095SDavid du Colombier</dl>
530*593dc095SDavid du Colombier
531*593dc095SDavid du Colombier<dl>
532*593dc095SDavid du Colombier<dt><b><tt>-dLastPage=</tt></b><em>pagenumber</em>
533*593dc095SDavid du Colombier<dd>Stops interpreting after the designated page of the document.
534*593dc095SDavid du Colombier</dl>
535*593dc095SDavid du Colombier
536*593dc095SDavid du Colombier <dl>
537*593dc095SDavid du Colombier<dt><b><tt>-dPDFFitPage</tt></b>
538*593dc095SDavid du Colombier<dd>Rather than selecting a PageSize given by the PDF MediaBox or
539*593dc095SDavid du ColombierCropBox (see -dUseCropBox), the PDF file will be scaled to fit
540*593dc095SDavid du Colombierthe current device page size (usually the default page size).
541*593dc095SDavid du Colombier<p>
542*593dc095SDavid du ColombierThis is useful to avoid clipping information on a PDF document when
543*593dc095SDavid du Colombiersending to a printer that may have unprintable areas at the edge of
544*593dc095SDavid du Colombierthe media larger than allowed for in the document.
545*593dc095SDavid du Colombier<p>
546*593dc095SDavid du ColombierThis is also useful for creating fixed size images of PDF files
547*593dc095SDavid du Colombierthat may have a variety of page sizes, for example thumbnail images.
548*593dc095SDavid du Colombier</dl>
549*593dc095SDavid du Colombier
550*593dc095SDavid du Colombier<dl>
551*593dc095SDavid du Colombier<dt><b><tt>-dPrinted</tt></b>
552*593dc095SDavid du Colombier<dt><b><tt>-dPrinted=false</tt></b>
553*593dc095SDavid du Colombier<dd>Determines whether the file should be displayed or printed using the
554*593dc095SDavid du Colombier"screen" or "printer" options for annotations and images.  With
555*593dc095SDavid du Colombier<b><tt>-dPrinted</tt></b>, the output will use the file's "print"
556*593dc095SDavid du Colombieroptions; with <b><tt>-dPrinted=false</tt></b>, the output will use the
557*593dc095SDavid du Colombierfile's "screen" options.  If neither of these is specified, the output will
558*593dc095SDavid du Colombieruse the screen options for any output device that doesn't have an
559*593dc095SDavid du Colombier<b><tt>OutputFile</tt></b> parameter, and the printer options for
560*593dc095SDavid du Colombierdevices that do have this parameter.
561*593dc095SDavid du Colombier</dl>
562*593dc095SDavid du Colombier
563*593dc095SDavid du Colombier<dl>
564*593dc095SDavid du Colombier<dt><b><tt>-dUseCropBox</tt></b>
565*593dc095SDavid du Colombier<dd>Sets the page size to the CropBox rather than the MediaBox.
566*593dc095SDavid du ColombierSome files have a CropBox that is smaller than the MediaBox and
567*593dc095SDavid du Colombiermay include white space, registration or cutting marks outside
568*593dc095SDavid du Colombierthe CropBox.  Using this option will set the page size
569*593dc095SDavid du Colombierappropriately for a viewer.
570*593dc095SDavid du Colombier</dl>
571*593dc095SDavid du Colombier
572*593dc095SDavid du Colombier<dl>
573*593dc095SDavid du Colombier<dt><b><tt>-sPDFPassword=</tt></b><em>password</em>
574*593dc095SDavid du Colombier<dd>Sets the user or owner password to be used in decoding encrypted
575*593dc095SDavid du ColombierPDF files.
576*593dc095SDavid du Colombier</dl>
577*593dc095SDavid du Colombier
578*593dc095SDavid du Colombier<h3><a name="PDF_problems"></a>Problems interpreting a PDF file</h3>
579*593dc095SDavid du Colombier
580*593dc095SDavid du Colombier<p>
581*593dc095SDavid du ColombierOccasionally you may try to read or print a 'PDF' file that
582*593dc095SDavid du ColombierGhostscript doesn't recognize as PDF, even though the same file
583*593dc095SDavid du Colombier<b><em>can</em></b> be opened and interpreted by an Adobe Acrobat viewer.
584*593dc095SDavid du ColombierIn many cases, this is because of incorrectly generated PDF. Acrobat
585*593dc095SDavid du Colombiertends to be very forgiving of invalid PDF files. Ghostscript tends to
586*593dc095SDavid du Colombierexpect files to conform to the standard. For example, even though
587*593dc095SDavid du Colombiervalid PDF files must begin with <b><tt>%PDF</tt></b>, Acrobat will
588*593dc095SDavid du Colombierscan the first 1000 bytes or so for this string, and ignore any preceding
589*593dc095SDavid du Colombiergarbage.
590*593dc095SDavid du Colombier
591*593dc095SDavid du Colombier<p>
592*593dc095SDavid du ColombierIn the past, Ghostscript's policy has been to simply fail with an
593*593dc095SDavid du Colombiererror message when confronted with these files. This policy has, no
594*593dc095SDavid du Colombierdoubt, encouraged PDF generators to be more careful. However, we now
595*593dc095SDavid du Colombierrecognize that this behavior is not very friendly for people who just
596*593dc095SDavid du Colombierwant to use Ghostscript to view or print PDF files. Our new policy is
597*593dc095SDavid du Colombierto try to render broken PDF's, and also to print a warning, so that
598*593dc095SDavid du ColombierGhostscript is still useful as a sanity-check for invalid files.
599*593dc095SDavid du Colombier
600*593dc095SDavid du Colombier<h3><a name="PDF_stdin"></a>PDF files from standard input</h3>
601*593dc095SDavid du Colombier
602*593dc095SDavid du Colombier<p>
603*593dc095SDavid du ColombierThe PDF language, unlike the PostScript language, inherently requires
604*593dc095SDavid du Colombierrandom access to the file.
605*593dc095SDavid du ColombierIf you provide PDF to standard input using the
606*593dc095SDavid du Colombierspecial filename <a href="#Pipes">'<tt>-</tt>'</a>,
607*593dc095SDavid du ColombierGhostscript will copy it to a temporary file before interpreting the PDF.
608*593dc095SDavid du Colombier
609*593dc095SDavid du Colombier<h2><a name="EPS"></a>Using Ghostscript with EPS files</h2>
610*593dc095SDavid du Colombier<p>
611*593dc095SDavid du ColombierEncapsulated PostScript (EPS) files are intended to be incorporated
612*593dc095SDavid du Colombierin other PostScript documents and may not display or print on their
613*593dc095SDavid du Colombierown.  An EPS file must conform to the Document Structuring Conventions,
614*593dc095SDavid du Colombiermust include a <b><tt>%%BoundingBox</tt></b> line to indicate the
615*593dc095SDavid du Colombierrectangle in which it will draw, must not use PostScript commands
616*593dc095SDavid du Colombierwhich will interfere with the document importing the EPS,
617*593dc095SDavid du Colombierand can have either zero pages or one page.
618*593dc095SDavid du ColombierGhostscript has support for handling EPS files, but requires
619*593dc095SDavid du Colombierthat the <b><tt>%%BoundingBox</tt></b> be in the header,
620*593dc095SDavid du Colombiernot the trailer.
621*593dc095SDavid du ColombierTo customize EPS handling, see <a href="#EPS_parameters">EPS parameters</a>.
622*593dc095SDavid du Colombier
623*593dc095SDavid du Colombier<p>
624*593dc095SDavid du ColombierFor the official description of the EPS file format, please
625*593dc095SDavid du Colombierrefer to the Adobe documentation in their tech note #5002. It
626*593dc095SDavid du Colombieris available from:
627*593dc095SDavid du Colombier<a href="http://partners.adobe.com/public/developer/ps/index_specs.html"
628*593dc095SDavid du Colombierclass="offsite">
629*593dc095SDavid du Colombierhttp://partners.adobe.com/public/developer/ps/index_specs.html</a>
630*593dc095SDavid du Colombier
631*593dc095SDavid du Colombier<h2><a name="SPOT"></a>Using Ghostscript with overprinting and spot colors</h2>
632*593dc095SDavid du Colombier
633*593dc095SDavid du Colombier<p>
634*593dc095SDavid du ColombierIn general with PostScript and PDF interpreters, the handling of
635*593dc095SDavid du Colombier<b>overprinting</b> and <b>spot colors</b> depends upon the
636*593dc095SDavid du Colombierprocess color model of the <a href="#Output_device">output device</a>. Devices
637*593dc095SDavid du Colombierthat produce gray or RGB output have an <b>additive</b> process color model.
638*593dc095SDavid du ColombierDevices which produce CMYK output have a <b>subtractive</b> process color model.
639*593dc095SDavid du ColombierDevices may, or may not, have support for spot colors.
640*593dc095SDavid du Colombier
641*593dc095SDavid du Colombier<blockquote><i>
642*593dc095SDavid du ColombierNote: The differences in appearance of files with overprinting and spot colors
643*593dc095SDavid du Colombiercaused by the differences in the color model of the output device are part of the
644*593dc095SDavid du ColombierPostScript and PDF specifications. They are not due to a limitation in the
645*593dc095SDavid du Colombierimplementation of Ghostscript or its output devices.
646*593dc095SDavid du Colombier</i></blockquote>
647*593dc095SDavid du Colombier
648*593dc095SDavid du Colombier<p>
649*593dc095SDavid du ColombierWith devices which use a subtractive process color model, both PostScript
650*593dc095SDavid du Colombierand PDF allow the drawing of objects using colorants (inks) for one or more planes
651*593dc095SDavid du Colombierwithout affecting the data for the remaining colorants. Thus the inks for one
652*593dc095SDavid du Colombierobject may <b><tt>overprint</tt></b> the inks for another object. In some cases
653*593dc095SDavid du Colombierthis produces a transparency like effect. (The effects of overprinting should
654*593dc095SDavid du Colombiernot be confused with the PDF 1.4 blending operations which are supported for
655*593dc095SDavid du Colombierall output devices.) Overprinting is not allowed for devices with an additive
656*593dc095SDavid du Colombierprocess color model. With files that use overprinting, the appearance of the
657*593dc095SDavid du Colombierresulting image can differ between devices which produce RGB output versus devices
658*593dc095SDavid du Colombierwhich produce CMYK output. Ghostscript automatically overprints (if needed)
659*593dc095SDavid du Colombierwhen the output device uses a subtractive process color model. For example,
660*593dc095SDavid du Colombierif the file is using overprinting, differences can be seen in the appearance
661*593dc095SDavid du Colombierof the output from the <a href="Devices.htm#TIFF">tiff24nc and tiff32nc devices</a>
662*593dc095SDavid du Colombierwhich use an RGB and a CMYK process color models.
663*593dc095SDavid du Colombier
664*593dc095SDavid du Colombier<p>
665*593dc095SDavid du ColombierMost of the Ghostscript <a href="Devices.htm">output devices</a> do not have
666*593dc095SDavid du Colombierfile formats which support spot colors. Instead spot colors are converted using
667*593dc095SDavid du Colombierthe tint transform function contained within the color space definition.. However
668*593dc095SDavid du Colombierthere are several devices which have support for spot colors. The PSD format
669*593dc095SDavid du Colombier(Adobe Photoshop) produced by the <a href="Devices.htm#PSD">psdcmyk device</a>
670*593dc095SDavid du Colombiercontains both the raster data plus an equivalent CMYK color for each spot color.
671*593dc095SDavid du ColombierThis allows Photoshop to simulate the appearance of the spot colors. The <a href="Devices.htm#display_device">display
672*593dc095SDavid du Colombierdevice (MS Windows, OS/2, gtk+)</a> can be used with different color models:
673*593dc095SDavid du ColombierGray, RGB, CMYK only, or CMYK plus spot colors (separation). The display device,
674*593dc095SDavid du Colombierwhen using its CMYK plus spot color (separation) mode, also uses an equivalent
675*593dc095SDavid du ColombierCMYK color to simulate the appearance of the spot color. The
676*593dc095SDavid du Colombier<a href="Devices.htm#TIFF">tiffsep
677*593dc095SDavid du Colombierdevice</a> creates output files for each separation (CMYK and any spot colors
678*593dc095SDavid du Colombierpresent). It also creates a composite CMYK file using an equivalent CMYK color
679*593dc095SDavid du Colombierto simulate the appearance of spot colors. The
680*593dc095SDavid du Colombier<a href="Devices.htm#XCF">xcfcmyk device</a>
681*593dc095SDavid du Colombiercreates output files with spot colors placed in separate alpha channels. (The
682*593dc095SDavid du ColombierXCF file format does not currently directly support spot colors.)
683*593dc095SDavid du Colombier
684*593dc095SDavid du Colombier<p>
685*593dc095SDavid du ColombierOverprinting with spot colors is not allowed if the tint transform function
686*593dc095SDavid du Colombieris being used to convert spot colors. Thus if spot colors are used with overprinting,
687*593dc095SDavid du Colombierthen the appearance of the result can differ between output devices. One result
688*593dc095SDavid du Colombierwould be obtained with a CMYK only device and another would be obtained with
689*593dc095SDavid du Colombiera CMYK plus spot color device. In a worst case situation where a file has overprinting
690*593dc095SDavid du Colombierwith both process (CMYK) and spot colors, it is possible to get three different
691*593dc095SDavid du Colombierappearances for the same input file using the
692*593dc095SDavid du Colombier<a href="Devices.htm#TIFF">tiff24nc</a> (RGB),
693*593dc095SDavid du Colombier<a href="Devices.htm#TIFF">tiff32nc</a> (CMYK), and
694*593dc095SDavid du Colombier<a href="Devices.htm#TIFF">tiffsep</a> (CMYK plus spot colors) devices.
695*593dc095SDavid du Colombier
696*593dc095SDavid du Colombier<blockquote><i>
697*593dc095SDavid du ColombierIn Adobe Acrobat, viewing of the effects of overprinting is enabled by the
698*593dc095SDavid du Colombier'Overprint Preview' item in the 'Advanced' menu. This feature is not available
699*593dc095SDavid du Colombierin the free Acrobat Reader. The free Acrobat Reader also uses the tint transform
700*593dc095SDavid du Colombierfunctions to convert spot colors to the appropriate alternate color space.
701*593dc095SDavid du Colombier</i></blockquote>
702*593dc095SDavid du Colombier
703*593dc095SDavid du Colombier
704*593dc095SDavid du Colombier<hr>
705*593dc095SDavid du Colombier
7063ff48bf5SDavid du Colombier<h2><a name="Finding_files"></a>How Ghostscript finds files</h2>
7077dd7cddfSDavid du Colombier
7087dd7cddfSDavid du Colombier<p>
7097dd7cddfSDavid du ColombierWhen looking for initialization files (<b><tt>gs_*.ps</tt></b>,
7107dd7cddfSDavid du Colombier<b><tt>pdf_*.ps</tt></b>), font files, the <b><tt>Fontmap</tt></b> file,
711*593dc095SDavid du Colombierfiles named on the command line, and resource files, Ghostscript first tests whether the
712*593dc095SDavid du Colombierfile name specifies an absolute path.
7137dd7cddfSDavid du Colombier
7147dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0>
715*593dc095SDavid du Colombier<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Testing a file name for an absolute path</font><hr>
7167dd7cddfSDavid du Colombier<tr>    <th align=left>System
7177dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;
7187dd7cddfSDavid du Colombier        <th align=left>Does the name ...
7197dd7cddfSDavid du Colombier<tr>    <td colspan=3><hr>
7207dd7cddfSDavid du Colombier<tr>    <td valign=top>Unix
7217dd7cddfSDavid du Colombier        <td>&nbsp;
722*593dc095SDavid du Colombier        <td>Begin with <b><tt><u>/</u></tt></b> ?
723*593dc095SDavid du Colombier<tr>    <td valign=top>MS Windows
7247dd7cddfSDavid du Colombier        <td>&nbsp;
7257dd7cddfSDavid du Colombier        <td>Have <b><tt><u>:</u></tt></b> as its second character, or
7267dd7cddfSDavid du Colombier                begin with <b><tt><u>/</u></tt></b>, <b><tt><u>\</u></tt></b>,
727*593dc095SDavid du Colombier                or <b><tt><u>//servername/share/</u></tt></b> ?
7287dd7cddfSDavid du Colombier<tr>    <td valign=top>VMS
7297dd7cddfSDavid du Colombier        <td>&nbsp;
730*593dc095SDavid du Colombier        <td>Contain a node, device, or root specification?
7317dd7cddfSDavid du Colombier</table></blockquote>
7327dd7cddfSDavid du Colombier
733*593dc095SDavid du Colombier<p>If the test succeeds, Ghostscript tries to open the file
7347dd7cddfSDavid du Colombierusing the name given.  Otherwise it tries directories in this order:
7357dd7cddfSDavid du Colombier
7367dd7cddfSDavid du Colombier<ol>
7377dd7cddfSDavid du Colombier<li>The current directory (unless disabled by the
7387dd7cddfSDavid du Colombier<a href="#P-_switch"><b><tt>-P-</tt></b> switch</a>);
7397dd7cddfSDavid du Colombier
7407dd7cddfSDavid du Colombier<li>The directories specified by <a href="#I_switch"><b><tt>-I</tt></b>
7417dd7cddfSDavid du Colombierswitches</a> in the command line, if any;
7427dd7cddfSDavid du Colombier
7437dd7cddfSDavid du Colombier<li>The directories specified by the <b><tt>GS_LIB</tt></b>
7447dd7cddfSDavid du Colombierenvironment variable, if any;
7457dd7cddfSDavid du Colombier
7467dd7cddfSDavid du Colombier<li>The directories specified by the
7477dd7cddfSDavid du Colombier<b><tt>GS_LIB_DEFAULT</tt></b> macro (if any) in the makefile
7487dd7cddfSDavid du Colombierwhen this executable was built.
7497dd7cddfSDavid du Colombier</ol>
7507dd7cddfSDavid du Colombier
7517dd7cddfSDavid du Colombier<p>
7527dd7cddfSDavid du Colombier<b><tt>GS_LIB_DEFAULT</tt></b>,
7537dd7cddfSDavid du Colombier<b><tt>GS_LIB</tt></b>, and the
7547dd7cddfSDavid du Colombier<b><tt>-I</tt></b> parameter may specify either a single
7557dd7cddfSDavid du Colombierdirectory or a list of directories separated by a character appropriate for
7567dd7cddfSDavid du Colombierthe operating system ("<b><tt>:</tt></b>" on Unix systems,
7577dd7cddfSDavid du Colombier"<b><tt>,</tt></b>" on VMS systems, and
758*593dc095SDavid du Colombier"<b><tt>;</tt></b>" on MS Windows systems).  We think that trying
7597dd7cddfSDavid du Colombierthe current directory first is a very bad idea -- it opens serious security
7607dd7cddfSDavid du Colombierloopholes and can lead to very confusing errors if one has more than one
7617dd7cddfSDavid du Colombierversion of Ghostscript in one's environment -- but when we attempted to
7627dd7cddfSDavid du Colombierchange it, users insisted that we change it back.  You can disable looking
7637dd7cddfSDavid du Colombierin the current directory first by using the
7647dd7cddfSDavid du Colombier<a href="#P_switch"><b><tt>-P-</tt></b> switch</a>.
7657dd7cddfSDavid du Colombier
7667dd7cddfSDavid du Colombier<p>
7677dd7cddfSDavid du ColombierNote that Ghostscript does not use this file searching algorithm for the
7687dd7cddfSDavid du Colombier<b><tt>run</tt></b> or <b><tt>file</tt></b>
7697dd7cddfSDavid du Colombieroperators: for these operators, it simply opens the file with the name
7707dd7cddfSDavid du Colombiergiven.  To run a file using the searching algorithm, use
7717dd7cddfSDavid du Colombier<b><tt>runlibfile</tt></b> instead of
7727dd7cddfSDavid du Colombier<b><tt>run</tt></b>.
7737dd7cddfSDavid du Colombier
7743ff48bf5SDavid du Colombier<h3><a name="PS_resources"></a>Finding PostScript Level 2 resources</h3>
7757dd7cddfSDavid du Colombier
7767dd7cddfSDavid du Colombier<p>
777*593dc095SDavid du ColombierAdobe specifies that resources are installed in a single directory.
778*593dc095SDavid du ColombierGhostscript instead maintains a list of resource directories,
779*593dc095SDavid du Colombierand uses an extended method for finding resource files.
780*593dc095SDavid du Colombier
781*593dc095SDavid du Colombier<p>
782*593dc095SDavid du ColombierThe search for a resource file depends on whether
783*593dc095SDavid du Colombierthe value of the system parameter <b><tt>GenericResourceDir</tt></b>
784*593dc095SDavid du Colombierspecifies an absolute path. The user may set it as explained in
785*593dc095SDavid du Colombier<a href="#Resource_related_parameters">Resource-related parameters</a>.
786*593dc095SDavid du Colombier
787*593dc095SDavid du Colombier<p>
788*593dc095SDavid du ColombierIf the user doesn't set the system parameter <b><tt>GenericResourceDir</tt></b>,
789*593dc095SDavid du ColombierGhostscript creates a default value for it with
790*593dc095SDavid du Colombierattaching the string <b><tt>../Resource</tt></b>
791*593dc095SDavid du Colombierto directory paths explained in
792*593dc095SDavid du Colombier<a href="#Finding_files">How Ghostscript finds files</a>,
793*593dc095SDavid du Colombierexcept the current directory.
794*593dc095SDavid du ColombierThe first successful combination is used.
795*593dc095SDavid du Colombier
796*593dc095SDavid du Colombier<p>
797*593dc095SDavid du ColombierIf the value of the system parameter <b><tt>GenericResourceDir</tt></b>
798*593dc095SDavid du Colombieris an absolute path (the default),
799*593dc095SDavid du ColombierGhostscript assumes a single resource directory.
800*593dc095SDavid du ColombierIt concatenates :
8017dd7cddfSDavid du Colombier
8027dd7cddfSDavid du Colombier<ol>
803*593dc095SDavid du Colombier<li>The value of the system parameter <b><tt>GenericResourceDir</tt></b>;
804*593dc095SDavid du Colombier<li>The name of the resource category (for instance, <b><tt>CMap</tt></b>);
805*593dc095SDavid du Colombier<li>The name of the resource instance (for instance, <b><tt>Identity-H</tt></b>).
8067dd7cddfSDavid du Colombier</ol>
8077dd7cddfSDavid du Colombier
808*593dc095SDavid du Colombier<p>If the value of the system parameter <b><tt>GenericResourceDir</tt></b>
809*593dc095SDavid du Colombieris not an absolute path,
810*593dc095SDavid du ColombierGhostscript assumes multiple resource directories.
811*593dc095SDavid du ColombierIn this case it concatenates :
812*593dc095SDavid du Colombier
813*593dc095SDavid du Colombier<ol>
814*593dc095SDavid du Colombier<li>A directory listed in the section
815*593dc095SDavid du Colombier<a href="#Finding_files">How Ghostscript finds files</a>,
816*593dc095SDavid du Colombierexcept the current directory;
817*593dc095SDavid du Colombier
818*593dc095SDavid du Colombier<li>The value of the system parameter <b><tt>GenericResourceDir</tt></b>;
819*593dc095SDavid du Colombier
820*593dc095SDavid du Colombier<li>The name of the resource category (for instance, <b><tt>CMap</tt></b>);
821*593dc095SDavid du Colombier
822*593dc095SDavid du Colombier<li>The name of the resource instance (for instance, <b><tt>Identity-H</tt></b>)
823*593dc095SDavid du Colombier</ol>
824*593dc095SDavid du Colombier
825*593dc095SDavid du ColombierDue to possible variety of the part 1, the first successful combination is used.
826*593dc095SDavid du ColombierFor example, if the value of the system parameter <b><tt>GenericResourceDir</tt></b>
827*593dc095SDavid du Colombieris the string  <b><tt>../Resource/</tt></b>
828*593dc095SDavid du Colombier(or its equivalent in the file path syntax of the underlying platform),
829*593dc095SDavid du ColombierGhostscript searches for <b><tt>../Resource/CMap/Identity-H</tt></b>
830*593dc095SDavid du Colombierfrom all directories listed in
831*593dc095SDavid du Colombier<a href="#Finding_files">How Ghostscript finds files</a>.
832*593dc095SDavid du ColombierSo in this example, if the user on a Windows platform specifies
833*593dc095SDavid du Colombierthe command line option <b><tt>-I.;../gs/lib;c:/gs8.50/lib</tt></b>,
834*593dc095SDavid du ColombierGhostscript searches for <b><tt>../gs/Resource/CMap/Identity-H</tt></b> and
835*593dc095SDavid du Colombierthen for <tt><b>c:/gs8.50/Resource/CMap/Identity-H</b></tt>.
836*593dc095SDavid du Colombier
837*593dc095SDavid du Colombier<p>
838*593dc095SDavid du ColombierTo get a proper platform dependent syntax Ghostscript inserts
839*593dc095SDavid du Colombierthe value of the system parameter
840*593dc095SDavid du Colombier<b><tt>GenericResourcePathSep</tt></b> (initially
841*593dc095SDavid du Colombier"<b><tt>/</tt></b>" on Unix and Windows, "<b><tt>:</tt></b>" on MacOS,
842*593dc095SDavid du Colombier"<b><tt>.</tt></b>" or "<b><tt>]</tt></b>" on OpenVMS).
843*593dc095SDavid du ColombierThe string <b><tt>../Resource</tt></b> is replaced with a
844*593dc095SDavid du Colombierplatform dependent equivalent.
845*593dc095SDavid du Colombier
846*593dc095SDavid du Colombier<p>
847*593dc095SDavid du ColombierIn the case of multiple resource directories,
848*593dc095SDavid du Colombierthe default <b><tt>ResourceFileName</tt></b> procedure retrieves either a path
849*593dc095SDavid du Colombierto the first avaliable resource, or if the resource is not available it
850*593dc095SDavid du Colombierreturns a path starting with <b><tt>GenericResourceDir</tt></b>.
851*593dc095SDavid du ColombierConsequently Postscript installers of Postscript resources
852*593dc095SDavid du Colombierwill overwrite an existing resource or add a new one to the first resource directory.
853*593dc095SDavid du Colombier
8547dd7cddfSDavid du Colombier<p>
8557dd7cddfSDavid du ColombierTo look up fonts, after exhausting the search method described in <a href="#Font_lookup">the
8567dd7cddfSDavid du Colombiernext section</a>, it concatenates together
8577dd7cddfSDavid du Colombier
8587dd7cddfSDavid du Colombier<ol>
8597dd7cddfSDavid du Colombier<li>the value of the system parameter
8607dd7cddfSDavid du Colombier<b><tt>FontResourceDir</tt></b> (initially
8617dd7cddfSDavid du Colombier<b><tt>/Resource/Font/</tt></b>)
8627dd7cddfSDavid du Colombier
8637dd7cddfSDavid du Colombier<li>the name of the resource font (for instance, <b><tt>Times-Roman</tt></b>)
8647dd7cddfSDavid du Colombier</ol>
8657dd7cddfSDavid du Colombier
8667dd7cddfSDavid du Colombier<p>
867*593dc095SDavid du ColombierNote that even although the system parameters are named "somethingDir", they
8687dd7cddfSDavid du Colombierare not just plain directory names: they have "<b><tt>/</tt></b>" on the
8697dd7cddfSDavid du Colombierend, so that they can be concatenated with the category name or font name.
8707dd7cddfSDavid du Colombier
8713ff48bf5SDavid du Colombier<h3><a name="Font_lookup"></a>Font lookup</h3>
8727dd7cddfSDavid du Colombier
8737dd7cddfSDavid du Colombier<p>
8747dd7cddfSDavid du ColombierGhostscript has a slightly different way to find the file containing a font
8757dd7cddfSDavid du Colombierwith a given name.  This rule uses not only the search path defined by
8767dd7cddfSDavid du Colombier<b><tt>-I</tt></b>, <b><tt>GS_LIB</tt></b>, and
877*593dc095SDavid du Colombier<b><tt>GS_LIB_DEFAULT</tt></b> <a href="#Finding_files">as described
8787dd7cddfSDavid du Colombierabove</a>, but also the directory that is the value of the
8797dd7cddfSDavid du Colombier<b><tt>FontResourceDir</tt></b> system parameter, and an additional list of
8807dd7cddfSDavid du Colombierdirectories that is the value of the <b><tt>GS_FONTPATH</tt></b> environment
8817dd7cddfSDavid du Colombiervariable (or the value provided with the <b><tt>-sFONTPATH=</tt></b> switch,
8827dd7cddfSDavid du Colombierif present).
8837dd7cddfSDavid du Colombier
8847dd7cddfSDavid du Colombier<p>
8857dd7cddfSDavid du ColombierAt startup time, Ghostscript reads in the <b><tt>Fontmap</tt></b> files in
8867dd7cddfSDavid du Colombierevery directory on the search path (or in the list provided with the
8877dd7cddfSDavid du Colombier<b><tt>-sFONTMAP=</tt></b> switch, if present): these files are catalogs of
8887dd7cddfSDavid du Colombierfonts and the files that contain them.  (See <a href="Fonts.htm#Fontmap">the
8897dd7cddfSDavid du Colombierdocumentation of fonts</a> for details.)  Then, when Ghostscript needs to
8907dd7cddfSDavid du Colombierfind a font that isn't already loaded into memory, it goes through a series
8917dd7cddfSDavid du Colombierof steps.
8927dd7cddfSDavid du Colombier
8937dd7cddfSDavid du Colombier<ul>
8947dd7cddfSDavid du Colombier
8957dd7cddfSDavid du Colombier<li>
8967dd7cddfSDavid du ColombierFirst, it looks up the font name in the combined Fontmaps.  If there is an
8977dd7cddfSDavid du Colombierentry for the desired font name, and the file named in the entry can be
8987dd7cddfSDavid du Colombierfound in some directory on the general search path (defined by
8997dd7cddfSDavid du Colombier<b><tt>-I</tt></b>, <b><tt>GS_LIB</tt></b>, and
9007dd7cddfSDavid du Colombier<b><tt>GS_LIB_DEFAULT</tt></b>), and the file is loaded successfully, and
9017dd7cddfSDavid du Colombierloading it defines a font of the desired name, that is the end of the
9027dd7cddfSDavid du Colombierprocess.
9037dd7cddfSDavid du Colombier
9047dd7cddfSDavid du Colombier<li>
9057dd7cddfSDavid du ColombierIf this process fails at any step, Ghostscript looks for a file whose name
9067dd7cddfSDavid du Colombieris the concatenation of the value of the <b><tt>FontResourceDir</tt></b>
9077dd7cddfSDavid du Colombiersystem parameter and the font name, with no extension.  If such a file
9087dd7cddfSDavid du Colombierexists, can be loaded, and defines a font of the desired name, that again is
9097dd7cddfSDavid du Colombierthe end.  The value of <b><tt>FontResourceDir</tt></b> is normally the
9107dd7cddfSDavid du Colombierstring <b><tt>/Resource/Font/</tt></b>, but it can be changed with the
9117dd7cddfSDavid du Colombier<b><tt>setsystemparams</tt></b> operator: see the PostScript Language
9127dd7cddfSDavid du ColombierReference Manual for details.
9137dd7cddfSDavid du Colombier
9147dd7cddfSDavid du Colombier<li>
9157dd7cddfSDavid du ColombierIf that fails, Ghostscript then looks for a file on the general search path
9167dd7cddfSDavid du Colombierwhose name is the desired font name, with no extension.  If such a file
9177dd7cddfSDavid du Colombierexists, can be loaded, and defines a font of the desired name, that again is
9187dd7cddfSDavid du Colombierthe end.
9197dd7cddfSDavid du Colombier
9207dd7cddfSDavid du Colombier<li>
9217dd7cddfSDavid du ColombierIf that too fails, Ghostscript looks at the <b><tt>GS_FONTPATH</tt></b>
9227dd7cddfSDavid du Colombierenvironment variable (or the value provided with the
9237dd7cddfSDavid du Colombier<b><tt>-sFONTPATH=</tt></b> switch, if present), which is also a list of
9247dd7cddfSDavid du Colombierdirectories.  It goes to the first directory on the list, looking for all
9257dd7cddfSDavid du Colombierfiles that appear to contain PostScript fonts; it then adds all those files
9267dd7cddfSDavid du Colombierand fonts to the combined Fontmaps, and starts over.
9277dd7cddfSDavid du Colombier
9287dd7cddfSDavid du Colombier<li>
9297dd7cddfSDavid du ColombierIf scanning the first FONTPATH directory doesn't produce a file that
9307dd7cddfSDavid du Colombierprovides the desired font, it adds the next directory on the FONTPATH list,
9317dd7cddfSDavid du Colombierand so on until either the font is defined successfully or the list is
9327dd7cddfSDavid du Colombierexhausted.
9337dd7cddfSDavid du Colombier
9347dd7cddfSDavid du Colombier<li>
9357dd7cddfSDavid du ColombierFinally, if all else fails, it will try to find a substitute for the font
9367dd7cddfSDavid du Colombierfrom among the standard 35 fonts.
9377dd7cddfSDavid du Colombier
9387dd7cddfSDavid du Colombier</ul>
9397dd7cddfSDavid du Colombier
940*593dc095SDavid du Colombier<p>
941*593dc095SDavid du Colombier<a href="#CIDFonts">CID fonts</a> (e.g. Chinese, Japanese and Korean)
942*593dc095SDavid du Colombierare found using a different method.
943*593dc095SDavid du Colombier
9447dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0>
9457dd7cddfSDavid du Colombier<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Differences between search path and font path</font><hr>
9467dd7cddfSDavid du Colombier<tr>    <th>Search path
9477dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;&nbsp;
9487dd7cddfSDavid du Colombier        <th>Font path
9497dd7cddfSDavid du Colombier<tr>    <td colspan=3><hr>
9507dd7cddfSDavid du Colombier<tr>    <td><b><tt>-I</tt></b> switch
9517dd7cddfSDavid du Colombier        <td>&nbsp;
9527dd7cddfSDavid du Colombier        <td><b><tt>-sFONTPATH=</tt></b> switch
9537dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
9547dd7cddfSDavid du Colombier<tr>    <td><b><tt>GS_LIB</tt></b> and <b><tt>GS_LIB_DEFAULT</tt></b>
9557dd7cddfSDavid du Colombier            environment variables
9567dd7cddfSDavid du Colombier        <td>&nbsp;
9577dd7cddfSDavid du Colombier        <td><b><tt>GS_FONTPATH</tt></b> environment variable
9587dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
9597dd7cddfSDavid du Colombier<tr>    <td valign=top>Consulted first
9607dd7cddfSDavid du Colombier        <td>&nbsp;
9617dd7cddfSDavid du Colombier        <td valign=top>Consulted only if search path and
9627dd7cddfSDavid du Colombier        <b><tt>FontResourceDir</tt></b> don't provide the file.
9637dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
9647dd7cddfSDavid du Colombier<tr>    <td valign=top>Font-name-to-file-name mapping given in Fontmap
9657dd7cddfSDavid du Colombier            files; aliases are possible, and there need not be any relation
9667dd7cddfSDavid du Colombier            between the font name in the Fontmap and the
9677dd7cddfSDavid du Colombier            <b><tt>FontName</tt></b> in the file.
9687dd7cddfSDavid du Colombier        <td>&nbsp; <td valign=top>Font-name-to-file-name mapping is
9697dd7cddfSDavid du Colombier            implicit -- the <b><tt>FontName</tt></b> in the file is
9707dd7cddfSDavid du Colombier            used. Aliases are not possible.
9717dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
9727dd7cddfSDavid du Colombier<tr>    <td valign=top>Only fonts and files named in Fontmap are used.
9737dd7cddfSDavid du Colombier        <td>&nbsp;
9747dd7cddfSDavid du Colombier        <td valign=top>Every Type 1 font file in each directory is
9757dd7cddfSDavid du Colombier            available; if TrueType fonts are supported (the
9767dd7cddfSDavid du Colombier            <b><tt>ttfont.dev</tt></b> feature was included when the
9777dd7cddfSDavid du Colombier            executable was built), they are also available.
9787dd7cddfSDavid du Colombier</table></blockquote>
9797dd7cddfSDavid du Colombier
9807dd7cddfSDavid du Colombier<p>
9817dd7cddfSDavid du ColombierIf you are using one of the following types of computer, you may wish to
9827dd7cddfSDavid du Colombierset the environment variable <b><tt>GS_FONTPATH</tt></b> to
9837dd7cddfSDavid du Colombierthe value indicated so that Ghostscript will automatically acquire all the
9847dd7cddfSDavid du Colombierinstalled Type 1 (and, if supported, TrueType) fonts (but see below for
9857dd7cddfSDavid du Colombiernotes on systems marked with "*"):
9867dd7cddfSDavid du Colombier
9877dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0>
9887dd7cddfSDavid du Colombier<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Suggested <b><tt>GS_FONTPATH</tt></b> for different systems</font><hr>
9897dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
9907dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;
9917dd7cddfSDavid du Colombier        <th align=left>System type
9927dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;
9937dd7cddfSDavid du Colombier        <th valign=bottom align=left><b><tt>GS_FONTPATH</tt></b>
9947dd7cddfSDavid du Colombier<tr>    <td colspan=5><hr>
9957dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
9967dd7cddfSDavid du Colombier        <td>&nbsp;
9977dd7cddfSDavid du Colombier        <td valign=top>Digital Unix
9987dd7cddfSDavid du Colombier        <td>&nbsp;
9997dd7cddfSDavid du Colombier        <td><b><tt>/usr/lib/X11/fonts/Type1Adobe</tt></b>
10007dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
10017dd7cddfSDavid du Colombier        <td>&nbsp;
10027dd7cddfSDavid du Colombier        <td valign=top>Ultrix
10037dd7cddfSDavid du Colombier        <td>&nbsp;
10047dd7cddfSDavid du Colombier        <td><b><tt>/usr/lib/DPS/outline/decwin</tt></b>
10057dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
10067dd7cddfSDavid du Colombier        <td>&nbsp;
10077dd7cddfSDavid du Colombier        <td valign=top>HP-UX 9
10087dd7cddfSDavid du Colombier        <td>&nbsp;
10097dd7cddfSDavid du Colombier        <td><b><tt>/usr/lib/X11/fonts/type1.st/typefaces</tt></b>
10107dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
10117dd7cddfSDavid du Colombier        <td>&nbsp;
10127dd7cddfSDavid du Colombier        <td valign=top>IBM AIX
10137dd7cddfSDavid du Colombier        <td>&nbsp;
10147dd7cddfSDavid du Colombier        <td><b><tt>/usr/lpp/DPS/fonts/outlines
10157dd7cddfSDavid du Colombier                <br>/usr/lpp/X11/lib/X11/fonts/Type1
10167dd7cddfSDavid du Colombier                <br>/usr/lpp/X11/lib/X11/fonts/Type1/DPS</tt></b>
10177dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
10187dd7cddfSDavid du Colombier        <td>&nbsp;
10197dd7cddfSDavid du Colombier        <td valign=top>NeXT
10207dd7cddfSDavid du Colombier        <td>&nbsp;
10217dd7cddfSDavid du Colombier        <td><b><tt>/NextLibrary/Fonts/outline</tt></b>
10227dd7cddfSDavid du Colombier<tr>    <td>*
10237dd7cddfSDavid du Colombier        <td>&nbsp;
10247dd7cddfSDavid du Colombier        <td valign=top>SGI IRIX
10257dd7cddfSDavid du Colombier        <td>&nbsp;
10267dd7cddfSDavid du Colombier        <td><b><tt>/usr/lib/DPS/outline/base
10277dd7cddfSDavid du Colombier                <br>/usr/lib/X11/fonts/Type1</tt></b>
10287dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
10297dd7cddfSDavid du Colombier        <td>&nbsp;
10307dd7cddfSDavid du Colombier        <td valign=top>SunOS 4.x<br>(NeWSprint only)
10317dd7cddfSDavid du Colombier        <td>&nbsp;
10327dd7cddfSDavid du Colombier        <td valign=top><b><tt>newsprint_2.5/SUNWsteNP/reloc/$BASEDIR/NeWSprint/<br>&nbsp;&nbsp;&nbsp;&nbsp;small_openwin/lib/fonts</tt></b>
10337dd7cddfSDavid du Colombier<tr>    <td>**
10347dd7cddfSDavid du Colombier        <td>&nbsp;
10357dd7cddfSDavid du Colombier        <td valign=top>SunOS 4.x
10367dd7cddfSDavid du Colombier        <td>&nbsp;
10377dd7cddfSDavid du Colombier        <td><b><tt>/usr/openwin/lib/X11/fonts/Type1/outline</tt></b>
10387dd7cddfSDavid du Colombier<tr>    <td>**
10397dd7cddfSDavid du Colombier        <td>&nbsp;
10407dd7cddfSDavid du Colombier        <td valign=top>Solaris 2.x
10417dd7cddfSDavid du Colombier        <td>&nbsp;
10427dd7cddfSDavid du Colombier        <td><b><tt>/usr/openwin/lib/X11/fonts/Type1/outline</tt></b>
10437dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
10447dd7cddfSDavid du Colombier        <td>&nbsp;
10457dd7cddfSDavid du Colombier        <td valign=top>VMS
10467dd7cddfSDavid du Colombier        <td>&nbsp;
10477dd7cddfSDavid du Colombier        <td><b><tt>SYS$COMMON:[SYSFONT.XDPS.OUTLINE]</tt></b>
10487dd7cddfSDavid du Colombier</table>
10497dd7cddfSDavid du Colombier
10507dd7cddfSDavid du Colombier<hr align=left width="25%">
10517dd7cddfSDavid du Colombier
10527dd7cddfSDavid du Colombier<p>
10537dd7cddfSDavid du Colombier<b>*</b> On SGI IRIX systems, you must use <b><tt>Fontmap.SGI</tt></b> in
10547dd7cddfSDavid du Colombierplace of <b><tt>Fontmap</tt></b> or <b><tt>Fontmap.GS</tt></b>, because
10557dd7cddfSDavid du Colombierotherwise the entries in <b><tt>Fontmap</tt></b> will take precedence over
10567dd7cddfSDavid du Colombierthe fonts in the FONTPATH directories.
10577dd7cddfSDavid du Colombier
10587dd7cddfSDavid du Colombier<p>
10597dd7cddfSDavid du Colombier<b>**</b> On Solaris systems simply setting <b><tt>GS_FONTPATH</tt></b> or
10607dd7cddfSDavid du Colombierusing <b><tt>-sFONTPATH=</tt></b> may not work, because for some reason some
10617dd7cddfSDavid du Colombierversions of Ghostscript can't seem to find any of the Type1 fonts in
10627dd7cddfSDavid du Colombier<b><tt>/usr/openwin/lib/X11/fonts/Type1/outline</tt></b>. (It says: "15
10637dd7cddfSDavid du Colombierfiles, 15 scanned, 0 new fonts". We think this problem has been fixed in
10647dd7cddfSDavid du ColombierGhostscript version 6.0, but we aren't sure because we've never been able to
10657dd7cddfSDavid du Colombierreproduce it.)  See <b><tt>Fontmap.Sol</tt></b> instead.  Also, on Solaris
10667dd7cddfSDavid du Colombier2.x it's probably not worth your while to add Sun's fonts to your font path
10677dd7cddfSDavid du Colombierand Fontmap.  The fonts Sun distributes on Solaris 2.x in the directories
10687dd7cddfSDavid du Colombier
10697dd7cddfSDavid du Colombier<blockquote><b><tt>
10707dd7cddfSDavid du Colombier        /usr/openwin/lib/X11/fonts/Type1<br>
10717dd7cddfSDavid du Colombier        /usr/openwin/lib/X11/fonts/Type1/outline
10727dd7cddfSDavid du Colombier</tt></b></blockquote>
10737dd7cddfSDavid du Colombier
10747dd7cddfSDavid du Colombier<p>
10757dd7cddfSDavid du Colombierare already represented among the ones distributed as part of Ghostscript;
10767dd7cddfSDavid du Colombierand on some test files, Sun's fonts have been shown to cause incorrect
10777dd7cddfSDavid du Colombierdisplays with Ghostscript.
10787dd7cddfSDavid du Colombier
10797dd7cddfSDavid du Colombier</blockquote>
10807dd7cddfSDavid du Colombier
10817dd7cddfSDavid du Colombier<p>
10827dd7cddfSDavid du ColombierThese paths may not be exactly right for your installation; if the indicated
10837dd7cddfSDavid du Colombierdirectory doesn't contain files whose names are familiar font names like
10847dd7cddfSDavid du ColombierCourier and Helvetica, you may wish to ask your system administrator where
10857dd7cddfSDavid du Colombierto find these fonts.
10867dd7cddfSDavid du Colombier
10877dd7cddfSDavid du Colombier<p>
10887dd7cddfSDavid du ColombierAdobe Acrobat comes with a set of fourteen Type 1 fonts, on Unix typically
10897dd7cddfSDavid du Colombierin a directory called ...<b><tt>/Acrobat3/Fonts</tt></b>.  There is no
10907dd7cddfSDavid du Colombierparticular reason to use these instead of the corresponding fonts in the
10917dd7cddfSDavid du ColombierGhostscript distribution (which are of just as good quality), except to save
10927dd7cddfSDavid du Colombierabout a megabyte of disk space, but the installation documentation explains
1093*593dc095SDavid du Colombierhow to do it <a href="Install.htm#Use_Acrobat_fonts_Unix">on Unix</a>.
1094*593dc095SDavid du Colombier
1095*593dc095SDavid du Colombier<h3><a name="CIDFonts"></a>CID fonts</h3>
1096*593dc095SDavid du Colombier
1097*593dc095SDavid du Colombier<p>
1098*593dc095SDavid du ColombierCID fonts are PostScript resources containing a
1099*593dc095SDavid du Colombierlarge number of glyphs (e.g. glyphs for Far East languages,
1100*593dc095SDavid du ColombierChinese, Japanese and Korean).
1101*593dc095SDavid du ColombierPlease refer to the PostScript Language Reference,
1102*593dc095SDavid du Colombierthird edition, for details.
1103*593dc095SDavid du Colombier
1104*593dc095SDavid du Colombier<p>
1105*593dc095SDavid du ColombierCID font resources are a different kind of PostScript resource from fonts.
1106*593dc095SDavid du ColombierIn particular, they cannot be used as regular fonts.
1107*593dc095SDavid du ColombierCID font resources must first be combined with a CMap resource, which
1108*593dc095SDavid du Colombierdefines specific codes for glyphs, before it can be used as a font. This
1109*593dc095SDavid du Colombierallows the reuse of a collection of glyphs with different encodings.
1110*593dc095SDavid du Colombier
1111*593dc095SDavid du Colombier<p>
1112*593dc095SDavid du ColombierThe simplest method to request a font composed of a CID font resource
1113*593dc095SDavid du Colombierand a CMap resource in a PostScript document is
1114*593dc095SDavid du Colombier<blockquote><b><tt>
1115*593dc095SDavid du Colombier/CIDFont-CMap findfont
1116*593dc095SDavid du Colombier</tt></b></blockquote>
1117*593dc095SDavid du Colombierwhere <b><tt>CIDFont</tt></b> is a name of any
1118*593dc095SDavid du ColombierCID font resource, and <b><tt>CMap</tt></b> is a name of a CMap resource
1119*593dc095SDavid du Colombierdesigned for the same character collection. The interpreter will compose
1120*593dc095SDavid du Colombierthe font automatically from the specified CID font and CMap resources.
1121*593dc095SDavid du ColombierAnother method is possible using the <b><tt>composefont</tt></b> operator.
1122*593dc095SDavid du Colombier
1123*593dc095SDavid du Colombier<p>
1124*593dc095SDavid du ColombierCID fonts must be placed in the <b><tt>/Resource/CIDFont/</tt></b> directory.
1125*593dc095SDavid du ColombierThey are not found using <a href="#Font_lookup">Font lookup</a>
1126*593dc095SDavid du Colombieron the search path or font path.
1127*593dc095SDavid du Colombier
1128*593dc095SDavid du Colombier<h3><a name="CIDFontSubstitution"></a>CID font substitution</h3>
1129*593dc095SDavid du Colombier
1130*593dc095SDavid du Colombier<p>
1131*593dc095SDavid du Colombier
1132*593dc095SDavid du Colombier<p>
1133*593dc095SDavid du ColombierSubstitution of CID font resources is controlled by the Ghostscript
1134*593dc095SDavid du Colombierconfiguration file <b><tt>lib/cidfmap</tt></b>,
1135*593dc095SDavid du Colombierwhich defines a CID font resource map.
1136*593dc095SDavid du ColombierThe file forms a table of records, each of which should use one of two formats,
1137*593dc095SDavid du Colombierexplained below. Users may modify <b><tt>lib/cidfmap</tt></b> to configure
1138*593dc095SDavid du ColombierGhostscript for a specific need.
1139*593dc095SDavid du Colombier
1140*593dc095SDavid du Colombier<p> To substitute a CID font resource with another CID font resource, add a record like this :
1141*593dc095SDavid du Colombier
1142*593dc095SDavid du Colombier<blockquote><b><tt>
1143*593dc095SDavid du Colombier/Substituted /Original ;
1144*593dc095SDavid du Colombier</tt></b></blockquote>
1145*593dc095SDavid du Colombierwhere <b><tt>Substituted</tt></b> is a name of CID font resource being used
1146*593dc095SDavid du Colombierby a document, and <b><tt>Original</tt></b> is a name of an available
1147*593dc095SDavid du ColombierCID font resource. Please pay attention that both them must be
1148*593dc095SDavid du Colombierdesigned for same character collection. In other words, you
1149*593dc095SDavid du Colombiercannot substitute a Japanese CID font resource with a Korean CID font resource,
1150*593dc095SDavid du Colombieretc. CMap resource names must not appear in
1151*593dc095SDavid du Colombier<b><tt>lib/cidfmap</tt></b>. The trailing semicolon and the space before it
1152*593dc095SDavid du Colombierare both required.
1153*593dc095SDavid du Colombier
1154*593dc095SDavid du Colombier<p>
1155*593dc095SDavid du Colombier
1156*593dc095SDavid du ColombierTo substitute (emulate) a CID font resource with a TrueType font file, add a record like this :
1157*593dc095SDavid du Colombier
1158*593dc095SDavid du Colombier<blockquote><b><tt>
1159*593dc095SDavid du Colombier/Substituted &lt;&lt; keys&amp;values &gt;&gt; ;
1160*593dc095SDavid du Colombier</tt></b></blockquote>
1161*593dc095SDavid du Colombier
1162*593dc095SDavid du ColombierWhere <b><tt>keys&amp;values</tt></b> are explained in the table below.
1163*593dc095SDavid du Colombier
1164*593dc095SDavid du Colombier<table cellpadding=0 cellspacing=10>
1165*593dc095SDavid du Colombier
1166*593dc095SDavid du Colombier<tr valign="top">       <th>Key
1167*593dc095SDavid du Colombier        <th>Type
1168*593dc095SDavid du Colombier        <th>Description
1169*593dc095SDavid du Colombier<tr valign="top">       <td><b><tt>/Path</tt></b>
1170*593dc095SDavid du Colombier        <td>string
1171*593dc095SDavid du Colombier        <td>A path to a TrueType font file.  This must be an absolute path.
1172*593dc095SDavid du Colombier        If using <b><tt><a href="#Safer">-dSAFER</a></tt></b>, the directory
1173*593dc095SDavid du Colombier        containing the font file must be on one of the permitted paths.
1174*593dc095SDavid du Colombier<tr valign="top">       <td><b><tt>/FileType</tt></b>
1175*593dc095SDavid du Colombier        <td>name
1176*593dc095SDavid du Colombier        <td>Must be <b><tt>/TrueType</tt></b>.
1177*593dc095SDavid du Colombier<tr valign="top">       <td><b><tt>/SubfontID</tt></b>
1178*593dc095SDavid du Colombier        <td>integer
1179*593dc095SDavid du Colombier        <td>(optional) Index of the font in font collection, such as TTC.
1180*593dc095SDavid du Colombier            This is ignored if <b><tt>Path</tt></b> doesn't specify a collection.
1181*593dc095SDavid du Colombier            The first font in a collection is 0.
1182*593dc095SDavid du Colombier            Default value is 0.
1183*593dc095SDavid du Colombier<tr valign="top">       <td><b><tt>/CSI</tt></b>
1184*593dc095SDavid du Colombier        <td>array of 2 elements
1185*593dc095SDavid du Colombier        <td>(required) Information for building <b><tt>CIDSystemInfo</tt></b>.
1186*593dc095SDavid du Colombier            The first element is a string, which specifies <b><tt>Ordering</tt></b>.
1187*593dc095SDavid du Colombier            The second element is a number, which specifies <b><tt>Supplement</tt></b>.
1188*593dc095SDavid du Colombier</table>
1189*593dc095SDavid du Colombier
1190*593dc095SDavid du Colombier<p>
1191*593dc095SDavid du ColombierCurrently only CIDFontType 2 can be emulated with a TrueType font.
1192*593dc095SDavid du ColombierThe TrueType font must contain enough characters to cover an
1193*593dc095SDavid du ColombierAdobe character collection, which is specified in <b><tt>Ordering</tt></b> and used in documents.
1194*593dc095SDavid du Colombier
1195*593dc095SDavid du Colombier<p>
1196*593dc095SDavid du ColombierExamples :
1197*593dc095SDavid du Colombier
1198*593dc095SDavid du Colombier
1199*593dc095SDavid du Colombier<blockquote><b><tt>
1200*593dc095SDavid du Colombier/Ryumin-Medium  /ShinGo-Bold ;<br>
1201*593dc095SDavid du Colombier/MS-Mincho &lt;&lt; /FileType /TrueType /Path (C:/WINDOWS/fonts/msmincho.ttc) /SubfontID 0 /CSI [(Japan1) 3] &gt;&gt; ;<br>
1202*593dc095SDavid du Colombier/Ryumin-Light /MS-Mincho ;<br>
1203*593dc095SDavid du Colombier<br>
1204*593dc095SDavid du Colombier/Batang &lt;&lt; /FileType /TrueType /Path (C:/WINDOWS/fonts/batang.ttc) /SubfontID 0 /CSI [(Korea1) 3] &gt;&gt; ;<br>
1205*593dc095SDavid du Colombier/Gulim &lt;&lt; /FileType /TrueType /Path (C:/WINDOWS/fonts/gulim.ttc) /SubfontID 0 /CSI [(Korea1) 3] &gt;&gt; ;<br>
1206*593dc095SDavid du Colombier/Dotum &lt;&lt; /FileType /TrueType /Path (C:/WINDOWS/fonts/gulim.ttc) /SubfontID 2 /CSI [(Korea1) 3] &gt;&gt; ;<br>
1207*593dc095SDavid du Colombier/HYSMyeongJo-Medium /Batang ;<br>
1208*593dc095SDavid du Colombier/HYRGoThic-Medium /Gulim ;<br>
1209*593dc095SDavid du Colombier/HYGoThic-Medium /Dotum ;<br>
1210*593dc095SDavid du Colombier<br>
1211*593dc095SDavid du Colombier/SimSun &lt;&lt; /FileType /TrueType /Path (C:/WINDOWS/fonts/simsun.ttc) /SubfontID 0 /CSI [(GB1) 2] &gt;&gt; ;<br>
1212*593dc095SDavid du Colombier/SimHei &lt;&lt; /FileType /TrueType /Path (C:/WINDOWS/fonts/simhei.ttf) /SubfontID 0 /CSI [(GB1) 2] &gt;&gt; ;<br>
1213*593dc095SDavid du Colombier/STSong-Light /SimSun ;<br>
1214*593dc095SDavid du Colombier/STHeiti-Regular /SimHei ;<br>
1215*593dc095SDavid du Colombier</tt></b></blockquote>
1216*593dc095SDavid du Colombier
1217*593dc095SDavid du Colombier<p>
1218*593dc095SDavid du ColombierNote that the font file path uses Postscript syntax for strings.
1219*593dc095SDavid du ColombierDue to that backslashes must be represented as a double backslash each.
1220*593dc095SDavid du Colombier
1221*593dc095SDavid du Colombier<p>
1222*593dc095SDavid du ColombierNote that loading truetype fonts directly from
1223*593dc095SDavid du Colombier<b>><tt>/Resources/CIDFont</tt></b> is no longer supported.
1224*593dc095SDavid du ColombierThere is no reliable way to generate a character ordering for truetype
1225*593dc095SDavid du Colombierfonts. The 7.0x versions of Ghostscript supported this by assuming a Japanese
1226*593dc095SDavid du Colombiercharacter ordering. This is replaced in the 8.0x and later releases with the more
1227*593dc095SDavid du Colombiergeneral <b><tt>cidfmap</tt></b> mechanism.
1228*593dc095SDavid du Colombier
1229*593dc095SDavid du Colombier<p>
1230*593dc095SDavid du ColombierThe PDF specification requires CID font files to be embedded,
1231*593dc095SDavid du Colombierhowever some documents omit them. As a workaround
1232*593dc095SDavid du Colombierthe PDF interpreter applies an additional substitution method when
1233*593dc095SDavid du Colombiera requested CID font resource is not embedded and it is not available.
1234*593dc095SDavid du ColombierIt takes values of the keys <b><tt>Registry</tt></b> and <b><tt>Ordering</tt></b>
1235*593dc095SDavid du Colombierfrom the <b><tt>CIDFontSystem</tt></b> dictionary,
1236*593dc095SDavid du Colombierand concatenates them with a dash inserted.
1237*593dc095SDavid du ColombierFor example, if a PDF CID font resource specifies
1238*593dc095SDavid du Colombier<blockquote><b><tt>
1239*593dc095SDavid du Colombier/CIDSystemInfo &lt;&lt; /Registry (Adobe) /Ordering (CNS1) /Supplement 1 &gt;&gt;
1240*593dc095SDavid du Colombier</tt></b></blockquote>
1241*593dc095SDavid du Colombierthe generated subsitituite name is <b><tt>Adobe-CNS1</tt></b>.
1242*593dc095SDavid du ColombierThe latter may look some confusing for a font name,
1243*593dc095SDavid du Colombierbut we keep it for compatibility with older Ghostscript versions,
1244*593dc095SDavid du Colombierwhich do so due to a historical reason.
1245*593dc095SDavid du ColombierAdd a proper record to <b><tt>lib/cidfmap</tt></b> to provide it.
1246*593dc095SDavid du Colombier
1247*593dc095SDavid du Colombier<p>
1248*593dc095SDavid du ColombierPlease note that when a PDF font resource specifies
1249*593dc095SDavid du Colombier<blockquote><b><tt>
1250*593dc095SDavid du Colombier/Registry (Adobe) /Ordering (Identity)
1251*593dc095SDavid du Colombier</tt></b></blockquote>
1252*593dc095SDavid du Colombierthere is no way to determine the language properly.
1253*593dc095SDavid du ColombierIf the CID font file is not embedded, the <b><tt>Adobe-Identity</tt></b>
1254*593dc095SDavid du Colombierrecord depends on the document and a correct record isn't possible when
1255*593dc095SDavid du Colombiera document refers to multiple Far East languages.
1256*593dc095SDavid du ColombierIn the latter case add individual records for specific CID font names used in the document.
1257*593dc095SDavid du Colombier
1258*593dc095SDavid du Colombier<p>
1259*593dc095SDavid du ColombierConsequently, if you want to handle any PDF document with
1260*593dc095SDavid du Colombiernon-embedded CID fonts (which isn't a correct PDF),
1261*593dc095SDavid du Colombieryou need to create a suitable <b><tt>lib/cidfmap</tt></b> by hand,
1262*593dc095SDavid du Colombierpossibly a specific one for each document.
12637dd7cddfSDavid du Colombier
12643ff48bf5SDavid du Colombier<h3><a name="Temp_files"></a>Temporary files</h3>
12657dd7cddfSDavid du Colombier
12667dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0>
12677dd7cddfSDavid du Colombier<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Where Ghostscript puts temporary files</font><hr>
12687dd7cddfSDavid du Colombier<tr valign=bottom>
12697dd7cddfSDavid du Colombier        <th align=left>Platform
12707dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;&nbsp;
12717dd7cddfSDavid du Colombier        <th align=left>Filename
12727dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;&nbsp;
12737dd7cddfSDavid du Colombier        <th align=left>Location
12747dd7cddfSDavid du Colombier<tr>    <td colspan=5><hr>
1275*593dc095SDavid du Colombier<tr valign=top> <td>MS Windows and OpenVMS
12767dd7cddfSDavid du Colombier        <td>&nbsp;
12777dd7cddfSDavid du Colombier        <td><b><tt>_temp_</tt></b>XX.XXX
12787dd7cddfSDavid du Colombier        <td>&nbsp;
12797dd7cddfSDavid du Colombier        <td>Current directory
12807dd7cddfSDavid du Colombier<tr valign=top> <td>OS/2
12817dd7cddfSDavid du Colombier        <td>&nbsp;
12827dd7cddfSDavid du Colombier        <td><b><tt>gs</tt></b>XXXXXX
12837dd7cddfSDavid du Colombier        <td>&nbsp;
12847dd7cddfSDavid du Colombier        <td>Current directory
12857dd7cddfSDavid du Colombier<tr valign=top> <td>Unix
12867dd7cddfSDavid du Colombier        <td>&nbsp;
12877dd7cddfSDavid du Colombier        <td><b><tt>gs_</tt></b>XXXXX
12887dd7cddfSDavid du Colombier        <td>&nbsp;
12897dd7cddfSDavid du Colombier        <td><b><tt>/tmp</tt></b>
12907dd7cddfSDavid du Colombier</table></blockquote>
12917dd7cddfSDavid du Colombier
12927dd7cddfSDavid du Colombier<p>
12937dd7cddfSDavid du ColombierYou can change in which directory Ghostscript creates temporary files by
12943ff48bf5SDavid du Colombiersetting the <b><tt>TMPDIR</tt></b> or <b><tt>TEMP</tt></b> environment
12953ff48bf5SDavid du Colombiervariable to the name of the directory you want used.  Ghostscript currently
12963ff48bf5SDavid du Colombierdoesn't do a very good job of deleting temporary files if it exits because
12973ff48bf5SDavid du Colombierof an error; you may have to delete them manually from time to time.
12987dd7cddfSDavid du Colombier
12997dd7cddfSDavid du Colombier
13007dd7cddfSDavid du Colombier<hr>
13017dd7cddfSDavid du Colombier
13023ff48bf5SDavid du Colombier<h2><a name="Platforms"></a>Notes on specific platforms</h2>
13037dd7cddfSDavid du Colombier
13043ff48bf5SDavid du Colombier<h3><a name="Unix"></a>Unix</h3>
13057dd7cddfSDavid du Colombier
13067dd7cddfSDavid du Colombier<p>
13077dd7cddfSDavid du ColombierThe Ghostscript distribution includes some Unix shell scripts to use with
13087dd7cddfSDavid du ColombierGhostscript in different environments.  These are all user-contributed
13097dd7cddfSDavid du Colombiercode, so if you have questions, please contact the user identified in the
13103ff48bf5SDavid du Colombierfile, not Aladdin Enterprises or artofcode LLC.
13117dd7cddfSDavid du Colombier
13127dd7cddfSDavid du Colombier<dl>
13137dd7cddfSDavid du Colombier<dt><b><tt>pv.sh</tt></b>
13147dd7cddfSDavid du Colombier<dd>Preview a specified page of a <b><tt>dvi</tt></b> file in an X window
13157dd7cddfSDavid du Colombier</dl>
13167dd7cddfSDavid du Colombier
13177dd7cddfSDavid du Colombier<dl>
13187dd7cddfSDavid du Colombier<dt><b><tt>sysvlp.sh</tt></b>
13197dd7cddfSDavid du Colombier<dd>System V 3.2 lp interface for parallel printer
13207dd7cddfSDavid du Colombier</dl>
13217dd7cddfSDavid du Colombier
13227dd7cddfSDavid du Colombier<dl>
13237dd7cddfSDavid du Colombier<dt><b><tt>pj-gs.sh</tt></b>
13247dd7cddfSDavid du Colombier<dd>Printing on an H-P PaintJet under HP-UX
13257dd7cddfSDavid du Colombier</dl>
13267dd7cddfSDavid du Colombier
13277dd7cddfSDavid du Colombier<dl>
13287dd7cddfSDavid du Colombier<dt><b><tt>unix-lpr.sh</tt></b>
13297dd7cddfSDavid du Colombier<dd>Queue filter for <b><tt>lpr</tt></b> under Unix;
13307dd7cddfSDavid du Colombier<a href="Unix-lpr.htm">its documentation</a> is intended for system
13317dd7cddfSDavid du Colombieradministrators
13327dd7cddfSDavid du Colombier</dl>
13337dd7cddfSDavid du Colombier
13347dd7cddfSDavid du Colombier<dl>
13357dd7cddfSDavid du Colombier<dt><b><tt>lprsetup.sh</tt></b>
13367dd7cddfSDavid du Colombier<dd>Setup for <b><tt>unix-lpr.sh</tt></b>
13377dd7cddfSDavid du Colombier</dl>
13387dd7cddfSDavid du Colombier
13397dd7cddfSDavid du Colombier<hr>
13407dd7cddfSDavid du Colombier
13413ff48bf5SDavid du Colombier<h3><a name="VMS"></a>VMS</h3>
13427dd7cddfSDavid du Colombier
13437dd7cddfSDavid du Colombier<ul>
13447dd7cddfSDavid du Colombier<li>To be able to specify switches and file names when invoking the
13457dd7cddfSDavid du Colombierinterpreter, define <b><tt>gs</tt></b> as a foreign command:
13467dd7cddfSDavid du Colombier
13477dd7cddfSDavid du Colombier<blockquote>
13487dd7cddfSDavid du Colombier<b><tt>$ gs == "$</tt></b><em>disk</em><b><tt>:[</tt></b><em>directory</em><b><tt>]gs.exe</tt></b>"
13497dd7cddfSDavid du Colombier</blockquote>
13507dd7cddfSDavid du Colombier
13517dd7cddfSDavid du Colombier<p>
13527dd7cddfSDavid du Colombierwhere the "<em>disk</em>" and "<em>directory</em>" specify where
13537dd7cddfSDavid du Colombierthe Ghostscript executable is located.  For instance,
13547dd7cddfSDavid du Colombier
13557dd7cddfSDavid du Colombier<blockquote><b><tt>
13567dd7cddfSDavid du Colombier$ gs == "$dua1:[ghostscript]gs.exe"
13577dd7cddfSDavid du Colombier</tt></b></blockquote>
13587dd7cddfSDavid du Colombier
13597dd7cddfSDavid du Colombier<li>On VMS systems, the last character of each "directory" name indicates
13607dd7cddfSDavid du Colombierwhat sort of entity the "directory" refers to.  If the "directory" name
13617dd7cddfSDavid du Colombierends with a colon "<b><tt>:</tt></b>", it is taken to refer to a logical
13627dd7cddfSDavid du Colombierdevice, for instance
13637dd7cddfSDavid du Colombier
13647dd7cddfSDavid du Colombier<blockquote><b><tt>
13657dd7cddfSDavid du Colombier$ define ghostscript_device dua1:[ghostscript_510]<br>
13667dd7cddfSDavid du Colombier$ define gs_lib ghostscript_device:
13677dd7cddfSDavid du Colombier</tt></b></blockquote>
13687dd7cddfSDavid du Colombier
13697dd7cddfSDavid du Colombier<p>
13707dd7cddfSDavid du ColombierIf the "directory" name ends with a closing square bracket
13717dd7cddfSDavid du Colombier"<b><tt>]</tt></b>", it is taken to refer to a real directory, for instance
13727dd7cddfSDavid du Colombier
13737dd7cddfSDavid du Colombier<blockquote><b><tt>
13747dd7cddfSDavid du Colombier$ define gs_lib dua1:[ghostscript]
13757dd7cddfSDavid du Colombier</tt></b></blockquote>
13767dd7cddfSDavid du Colombier
13777dd7cddfSDavid du Colombier<li>Defining the logical <b><tt>GS_LIB</tt></b>
13787dd7cddfSDavid du Colombier
13797dd7cddfSDavid du Colombier<blockquote>
13807dd7cddfSDavid du Colombier<b><tt>$ define gs_lib</tt></b> <em>disk</em><b><tt>:[</tt></b><em>directory</em><b><tt>]</tt></b>
13817dd7cddfSDavid du Colombier</blockquote>
13827dd7cddfSDavid du Colombier
13837dd7cddfSDavid du Colombier<p>
13847dd7cddfSDavid du Colombierallows Ghostscript to find its initialization files in the Ghostscript
13857dd7cddfSDavid du Colombierdirectory even if that's not where the executable resides.<br>&nbsp;
13867dd7cddfSDavid du Colombier
13877dd7cddfSDavid du Colombier<li>Although VMS DCL itself converts unquoted parameters to upper case, C
13887dd7cddfSDavid du Colombierprograms such as Ghostscript receive their parameters through the C runtime
13897dd7cddfSDavid du Colombierlibrary, which forces all unquoted command-line parameters to lower case.
13907dd7cddfSDavid du ColombierThat is, with the command
13917dd7cddfSDavid du Colombier
13927dd7cddfSDavid du Colombier<blockquote><b><tt>
13937dd7cddfSDavid du Colombier$ gs -Isys$login:
13947dd7cddfSDavid du Colombier</tt></b></blockquote>
13957dd7cddfSDavid du Colombier
13967dd7cddfSDavid du Colombier<p>
13977dd7cddfSDavid du ColombierGhostscript sees the switch as <b><tt>-isys$login</tt></b>,
13987dd7cddfSDavid du Colombierwhich doesn't work.  To preserve the case of switches, quote them like
13997dd7cddfSDavid du Colombierthis:
14007dd7cddfSDavid du Colombier
14017dd7cddfSDavid du Colombier<blockquote><b><tt>
14027dd7cddfSDavid du Colombier$ gs "-Isys$login:"
14037dd7cddfSDavid du Colombier</tt></b></blockquote>
14047dd7cddfSDavid du Colombier
14057dd7cddfSDavid du Colombier<li>If you write printer output to a file with
14067dd7cddfSDavid du Colombier<b><tt>-sOutputFile=</tt></b> and then want to print the file later, use
14077dd7cddfSDavid du Colombier"<b><tt>PRINT/PASSALL</tt></b>".
14087dd7cddfSDavid du Colombier</ul>
14097dd7cddfSDavid du Colombier
14107dd7cddfSDavid du Colombier<ul>
14117dd7cddfSDavid du Colombier<li>PDF files (or PostScript files that use the
14127dd7cddfSDavid du Colombier<b><tt>setfileposition</tt></b> operator) must be "stream LF" type files to
14137dd7cddfSDavid du Colombierwork properly on VMS systems. (<b><em>Note:</em></b> This definitely matters
14147dd7cddfSDavid du Colombierif Ghostscript was compiled with DEC C; we are not sure of the situation if
14157dd7cddfSDavid du Colombieryou use <b><tt>gcc</tt></b>.)  Because of this, if you transfer files by
14167dd7cddfSDavid du ColombierFTP, you probably need to do one of these two things after the transfer:
14177dd7cddfSDavid du Colombier
14187dd7cddfSDavid du Colombier<ol>
14197dd7cddfSDavid du Colombier<li>If the FTP transfer was in text (ASCII) mode:
14207dd7cddfSDavid du Colombier
14217dd7cddfSDavid du Colombier<blockquote>
14227dd7cddfSDavid du Colombier<b><tt>$ convert/fdl=streamlf.fdl</tt></b> input-file output-file
14237dd7cddfSDavid du Colombier</blockquote>
14247dd7cddfSDavid du Colombier
14257dd7cddfSDavid du Colombier<p>
14267dd7cddfSDavid du Colombierwhere the contents of the file <b><tt>STREAMLF.FDL</tt></b> are
14277dd7cddfSDavid du Colombier
14283ff48bf5SDavid du Colombier<blockquote>
14297dd7cddfSDavid du Colombier<pre>FILE
14307dd7cddfSDavid du Colombier        ORGANIZATION            sequential
14317dd7cddfSDavid du Colombier
14327dd7cddfSDavid du ColombierRECORD
14337dd7cddfSDavid du Colombier        BLOCK_SPAN              yes
14347dd7cddfSDavid du Colombier        CARRIAGE_CONTROL        carriage_return
14357dd7cddfSDavid du Colombier        FORMAT                  stream_lf
14363ff48bf5SDavid du Colombier</pre></blockquote>
14377dd7cddfSDavid du Colombier
14387dd7cddfSDavid du Colombier<li>If the FTP transfer was in binary mode:
14397dd7cddfSDavid du Colombier
14407dd7cddfSDavid du Colombier<blockquote><b><tt>
14417dd7cddfSDavid du Colombier     $ set file/attribute=(rfm:stmlf)
14427dd7cddfSDavid du Colombier</tt></b></blockquote>
14437dd7cddfSDavid du Colombier</ol>
14447dd7cddfSDavid du Colombier</ul>
14457dd7cddfSDavid du Colombier
14463ff48bf5SDavid du Colombier<h4><a name="VMS_X_Windows"></a>Using X Windows on VMS</h4>
14477dd7cddfSDavid du Colombier
14487dd7cddfSDavid du Colombier<p>
14497dd7cddfSDavid du ColombierIf you are using on an X Windows display, you can set it up with the node
14507dd7cddfSDavid du Colombiername and network transport, for instance
14517dd7cddfSDavid du Colombier
14527dd7cddfSDavid du Colombier<blockquote><b><tt>
14537dd7cddfSDavid du Colombier        $ set display/create/node="doof.city.com"/transport=tcpip
14547dd7cddfSDavid du Colombier</tt></b></blockquote>
14557dd7cddfSDavid du Colombier
14567dd7cddfSDavid du Colombier<p>
14577dd7cddfSDavid du Colombierand then run Ghostscript by typing <b><tt>gs</tt></b> at the command line.
14587dd7cddfSDavid du Colombier
14597dd7cddfSDavid du Colombier<hr>
14607dd7cddfSDavid du Colombier
14613ff48bf5SDavid du Colombier<h3><a name="MS_Windows"></a>MS Windows</h3>
14627dd7cddfSDavid du Colombier
14637dd7cddfSDavid du Colombier<p>
1464*593dc095SDavid du ColombierThe name of the Ghostscript command line executable on MS Windows is
1465*593dc095SDavid du Colombier<tt>gswin32c</tt> so use this instead of the plain '<tt>gs</tt>' in
1466*593dc095SDavid du Colombierthe quickstart examples.
1467*593dc095SDavid du Colombier
1468*593dc095SDavid du Colombier<p>
1469*593dc095SDavid du ColombierYou must add <em>gs\</em><tt>bin</tt> and
1470*593dc095SDavid du Colombier<em>gs\</em><tt>lib</tt> to the <b><tt>PATH</tt></b>, where
14717dd7cddfSDavid du Colombier<em>gs</em> is the top-level Ghostscript directory.
14727dd7cddfSDavid du Colombier
1473*593dc095SDavid du Colombier<p>
1474*593dc095SDavid du ColombierWhen passing options to ghostcript through a batch file wrapper such as
1475*593dc095SDavid du Colombier<tt>ps2pdf.bat</tt> you need to substitute '#' for '=' as the separator
1476*593dc095SDavid du Colombierbetween options and their arguments. For example:
1477*593dc095SDavid du Colombier<blockquote><pre>
1478*593dc095SDavid du Colombierps2pdf -sPAPERSIZE#a4 file.ps file.pdf
1479*593dc095SDavid du Colombier</pre></blockquote>
1480*593dc095SDavid du Colombier
1481*593dc095SDavid du ColombierGhostscript treats '#' the same internally, and the '=' is mangled by
1482*593dc095SDavid du Colombierthe command shell.
1483*593dc095SDavid du Colombier
1484*593dc095SDavid du Colombier<p>
1485*593dc095SDavid du ColombierThere is also an older version for windows called just <tt>gswin32</tt>
1486*593dc095SDavid du Colombierthat provides its own window for the interactive postscript prompt. Except
1487*593dc095SDavid du Colombieron Windows 3.1, gswin32c is the better option since it uses the
1488*593dc095SDavid du Colombiernative command prompt window.
1489*593dc095SDavid du Colombier
14907dd7cddfSDavid du Colombier<hr>
14917dd7cddfSDavid du Colombier
14923ff48bf5SDavid du Colombier<h3><a name="MS-DOS"></a>MS-DOS</h3>
14937dd7cddfSDavid du Colombier
14947dd7cddfSDavid du Colombier<p>
1495*593dc095SDavid du Colombier<strong>Note:</strong> Ghostscript is no longer supported on MS-DOS.
14967dd7cddfSDavid du Colombier
14977dd7cddfSDavid du Colombier<p>
1498*593dc095SDavid du ColombierInvoking Ghostscript from the command prompt in Windows is supported by
1499*593dc095SDavid du Colombierthe Windows executable described above.
15007dd7cddfSDavid du Colombier
15017dd7cddfSDavid du Colombier<hr>
15027dd7cddfSDavid du Colombier
15033ff48bf5SDavid du Colombier<h3><a name="X_Windows"></a>X Windows</h3>
15047dd7cddfSDavid du Colombier
15057dd7cddfSDavid du Colombier<p>
15067dd7cddfSDavid du ColombierGhostscript looks for the following resources under the program name
15077dd7cddfSDavid du Colombier<b><tt>ghostscript</tt></b> and class name
15087dd7cddfSDavid du Colombier<b><tt>Ghostscript</tt></b>; the ones marked "**" are
15097dd7cddfSDavid du Colombiercalculated from display metrics:
15107dd7cddfSDavid du Colombier
15117dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0>
15127dd7cddfSDavid du Colombier<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">X Windows resources</font><hr>
15137dd7cddfSDavid du Colombier<tr>    <th align=left>Name
15147dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;
15157dd7cddfSDavid du Colombier        <th align=left>Class
15167dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;
15177dd7cddfSDavid du Colombier        <th align=left>Default
15187dd7cddfSDavid du Colombier<tr>    <td colspan=5><hr>
15197dd7cddfSDavid du Colombier<tr>    <td><b><tt>background</tt></b>
15207dd7cddfSDavid du Colombier        <td>&nbsp;
15217dd7cddfSDavid du Colombier        <td><b><tt>Background</tt></b>
15227dd7cddfSDavid du Colombier        <td>&nbsp;
15237dd7cddfSDavid du Colombier        <td><b><tt>white</tt></b>
15247dd7cddfSDavid du Colombier<tr>    <td><b><tt>foreground</tt></b>
15257dd7cddfSDavid du Colombier        <td>&nbsp;
15267dd7cddfSDavid du Colombier        <td><b><tt>Foreground</tt></b>
15277dd7cddfSDavid du Colombier        <td>&nbsp;
15287dd7cddfSDavid du Colombier        <td><b><tt>black</tt></b>
15297dd7cddfSDavid du Colombier<tr>    <td><b><tt>borderColor</tt></b>
15307dd7cddfSDavid du Colombier        <td>&nbsp;
15317dd7cddfSDavid du Colombier        <td><b><tt>BorderColor</tt></b>
15327dd7cddfSDavid du Colombier        <td>&nbsp;
15337dd7cddfSDavid du Colombier        <td><b><tt>black</tt></b>
15347dd7cddfSDavid du Colombier<tr>    <td><b><tt>borderWidth</tt></b>
15357dd7cddfSDavid du Colombier        <td>&nbsp;
15367dd7cddfSDavid du Colombier        <td><b><tt>BorderWidth</tt></b>
15377dd7cddfSDavid du Colombier        <td>&nbsp;
15387dd7cddfSDavid du Colombier        <td><b><tt>1</tt></b>
15397dd7cddfSDavid du Colombier<tr>    <td><b><tt>geometry</tt></b>
15407dd7cddfSDavid du Colombier        <td>&nbsp;
15417dd7cddfSDavid du Colombier        <td><b><tt>Geometry</tt></b>
15427dd7cddfSDavid du Colombier        <td>&nbsp;
15437dd7cddfSDavid du Colombier        <td><b><tt>NULL</tt></b>
15447dd7cddfSDavid du Colombier<tr>    <td><b><tt>xResolution</tt></b>
15457dd7cddfSDavid du Colombier        <td>&nbsp;
15467dd7cddfSDavid du Colombier        <td><b><tt>Resolution</tt></b>
15477dd7cddfSDavid du Colombier        <td>&nbsp;
15487dd7cddfSDavid du Colombier        <td>**
15497dd7cddfSDavid du Colombier<tr>    <td><b><tt>yResolution</tt></b>
15507dd7cddfSDavid du Colombier        <td>&nbsp;
15517dd7cddfSDavid du Colombier        <td><b><tt>Resolution</tt></b>
15527dd7cddfSDavid du Colombier        <td>&nbsp;
15537dd7cddfSDavid du Colombier        <td>**
15547dd7cddfSDavid du Colombier<tr>    <td><b><tt>useExternalFonts</tt></b>
15557dd7cddfSDavid du Colombier        <td>&nbsp;
15567dd7cddfSDavid du Colombier        <td><b><tt>UseExternalFonts</tt></b>
15577dd7cddfSDavid du Colombier        <td>&nbsp;
15587dd7cddfSDavid du Colombier        <td><b><tt>true</tt></b>
15597dd7cddfSDavid du Colombier<tr>    <td><b><tt>useScalableFonts</tt></b>
15607dd7cddfSDavid du Colombier        <td>&nbsp;
15617dd7cddfSDavid du Colombier        <td><b><tt>UseScalableFonts</tt></b>
15627dd7cddfSDavid du Colombier        <td>&nbsp;
15637dd7cddfSDavid du Colombier        <td><b><tt>true</tt></b>
15647dd7cddfSDavid du Colombier<tr>    <td><b><tt>logExternalFonts</tt></b>
15657dd7cddfSDavid du Colombier        <td>&nbsp;
15667dd7cddfSDavid du Colombier        <td><b><tt>LogExternalFonts</tt></b>
15677dd7cddfSDavid du Colombier        <td>&nbsp;
15687dd7cddfSDavid du Colombier        <td><b><tt>false</tt></b>
15697dd7cddfSDavid du Colombier<tr>    <td><b><tt>externalFontTolerance</tt></b>
15707dd7cddfSDavid du Colombier        <td>&nbsp;
15717dd7cddfSDavid du Colombier        <td><b><tt>ExternalFontTolerance</tt></b>
15727dd7cddfSDavid du Colombier        <td>&nbsp;
15737dd7cddfSDavid du Colombier        <td><b><tt>10.0</tt></b>
15747dd7cddfSDavid du Colombier<tr>    <td><b><tt>palette</tt></b>
15757dd7cddfSDavid du Colombier        <td>&nbsp;
15767dd7cddfSDavid du Colombier        <td><b><tt>Palette</tt></b>
15777dd7cddfSDavid du Colombier        <td>&nbsp;
15787dd7cddfSDavid du Colombier        <td><b><tt>Color</tt></b>
15797dd7cddfSDavid du Colombier<tr>    <td><b><tt>maxGrayRamp</tt></b>
15807dd7cddfSDavid du Colombier        <td>&nbsp;
15817dd7cddfSDavid du Colombier        <td><b><tt>MaxGrayRamp</tt></b>
15827dd7cddfSDavid du Colombier        <td>&nbsp;
15837dd7cddfSDavid du Colombier        <td><b><tt>128</tt></b>
15847dd7cddfSDavid du Colombier<tr>    <td><b><tt>maxRGBRamp</tt></b>
15857dd7cddfSDavid du Colombier        <td>&nbsp;
15867dd7cddfSDavid du Colombier        <td><b><tt>MaxRGBRamp</tt></b>
15877dd7cddfSDavid du Colombier        <td>&nbsp;
15887dd7cddfSDavid du Colombier        <td><b><tt>5</tt></b>
15897dd7cddfSDavid du Colombier<tr>    <td><b><tt>maxDynamicColors</tt></b>
15907dd7cddfSDavid du Colombier        <td>&nbsp;
15917dd7cddfSDavid du Colombier        <td><b><tt>MaxDynamicColors</tt></b>
15927dd7cddfSDavid du Colombier        <td>&nbsp;
15937dd7cddfSDavid du Colombier        <td><b><tt>256</tt></b>
15947dd7cddfSDavid du Colombier<tr>    <td><b><tt>useBackingPixmap</tt></b>
15957dd7cddfSDavid du Colombier        <td>&nbsp;
15967dd7cddfSDavid du Colombier        <td><b><tt>UseBackingPixmap</tt></b>
15977dd7cddfSDavid du Colombier        <td>&nbsp;
15987dd7cddfSDavid du Colombier        <td><b><tt>true</tt></b>
15997dd7cddfSDavid du Colombier<tr>    <td><b><tt>useXPutImage</tt></b>
16007dd7cddfSDavid du Colombier        <td>&nbsp;
16017dd7cddfSDavid du Colombier        <td><b><tt>UseXPutImage</tt></b>
16027dd7cddfSDavid du Colombier        <td>&nbsp;
16037dd7cddfSDavid du Colombier        <td><b><tt>true</tt></b>
16047dd7cddfSDavid du Colombier<tr>    <td><b><tt>useXSetTile</tt></b>
16057dd7cddfSDavid du Colombier        <td>&nbsp;
16067dd7cddfSDavid du Colombier        <td><b><tt>UseXSetTile</tt></b>
16077dd7cddfSDavid du Colombier        <td>&nbsp;
16087dd7cddfSDavid du Colombier        <td><b><tt>true</tt></b>
16097dd7cddfSDavid du Colombier<tr>    <td><b><tt>regularFonts</tt></b>
16107dd7cddfSDavid du Colombier        <td>&nbsp;
16117dd7cddfSDavid du Colombier        <td><b><tt>RegularFonts</tt></b>
16127dd7cddfSDavid du Colombier        <td>&nbsp;
16137dd7cddfSDavid du Colombier        <td>See "<a href="#X_fonts">X fonts</a>"
16147dd7cddfSDavid du Colombier<tr>    <td><b><tt>symbolFonts</tt></b>
16157dd7cddfSDavid du Colombier        <td>&nbsp;
16167dd7cddfSDavid du Colombier        <td><b><tt>SymbolFonts</tt></b>
16177dd7cddfSDavid du Colombier        <td>&nbsp;
16187dd7cddfSDavid du Colombier        <td>See "<a href="#X_fonts">X fonts</a>"
16197dd7cddfSDavid du Colombier<tr>    <td><b><tt>dingbatFonts</tt></b>
16207dd7cddfSDavid du Colombier        <td>&nbsp;
16217dd7cddfSDavid du Colombier        <td><b><tt>DingbatFonts</tt></b>
16227dd7cddfSDavid du Colombier        <td>&nbsp;
16237dd7cddfSDavid du Colombier        <td>See "<a href="#X_fonts">X fonts</a>"
16247dd7cddfSDavid du Colombier</table></blockquote>
16257dd7cddfSDavid du Colombier
16263ff48bf5SDavid du Colombier<h4><a name="X_resources"></a>X resources</h4>
16277dd7cddfSDavid du Colombier
16287dd7cddfSDavid du Colombier<ul>
16297dd7cddfSDavid du Colombier<li>
16307dd7cddfSDavid du ColombierTo set X resources, put them in a file (such as
16317dd7cddfSDavid du Colombier<b><tt>~/.Xdefaults</tt></b> on Unix) in a form like this:
16327dd7cddfSDavid du Colombier
16337dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0>
16347dd7cddfSDavid du Colombier<tr><td><b><tt>Ghostscript*geometry:</tt></b><td><b><tt>&nbsp;&nbsp;</tt></b><td><b><tt>595x842-0+0</tt></b>
16357dd7cddfSDavid du Colombier<tr><td><b><tt>Ghostscript*xResolution:</tt></b><td><b><tt>&nbsp;</tt></b><td><b><tt>72</tt></b>
16367dd7cddfSDavid du Colombier<tr><td><b><tt>Ghostscript*yResolution:</tt></b><td><b><tt>&nbsp;</tt></b><td><b><tt>72</tt></b>
16377dd7cddfSDavid du Colombier</table></blockquote>
16387dd7cddfSDavid du Colombier
16397dd7cddfSDavid du Colombier<p>
16407dd7cddfSDavid du ColombierThen merge these resources into the X server's resource database:
16417dd7cddfSDavid du Colombier
16427dd7cddfSDavid du Colombier<blockquote><b><tt>
16437dd7cddfSDavid du Colombier        xrdb -merge ~/.Xdefaults
16447dd7cddfSDavid du Colombier</tt></b></blockquote>
16457dd7cddfSDavid du Colombier
16467dd7cddfSDavid du Colombier<li>
16477dd7cddfSDavid du ColombierGhostscript doesn't look at the default system background and foreground
16487dd7cddfSDavid du Colombiercolors; if you want to change the background or foreground color, you must
16497dd7cddfSDavid du Colombierset them explicitly for Ghostscript.  This is a deliberate choice, so that
16507dd7cddfSDavid du ColombierPostScript documents will display correctly by default -- with white as
16517dd7cddfSDavid du Colombierwhite and black as black -- even if text windows use other colors.
16527dd7cddfSDavid du Colombier
16537dd7cddfSDavid du Colombier<li>
16547dd7cddfSDavid du ColombierThe <b><tt>geometry</tt></b> resource affects only window placement.
16557dd7cddfSDavid du Colombier
16567dd7cddfSDavid du Colombier<li>
1657*593dc095SDavid du ColombierResolution is expressed in pixels per inch (1 inch = 25.4mm).
16587dd7cddfSDavid du Colombier
16597dd7cddfSDavid du Colombier<li>
16607dd7cddfSDavid du ColombierThe font tolerance gives the largest acceptable difference in height of the
16617dd7cddfSDavid du Colombierscreen font, expressed as a percentage of the height of the desired font.
16627dd7cddfSDavid du Colombier
16637dd7cddfSDavid du Colombier<li>
16647dd7cddfSDavid du ColombierThe <b><tt>palette</tt></b> resource can be used to restrict Ghostscript to
16657dd7cddfSDavid du Colombierusing a grayscale or monochrome palette.
16667dd7cddfSDavid du Colombier
16677dd7cddfSDavid du Colombier<li>
16687dd7cddfSDavid du Colombier<b><tt>maxRGBRamp</tt></b> and
16697dd7cddfSDavid du Colombier<b><tt>maxGrayRamp</tt></b> control the maximum number of
16707dd7cddfSDavid du Colombiercolors that ghostscript allocates ahead of time for the dither cube (ramp).
16717dd7cddfSDavid du ColombierGhostscript never preallocates more than half the cells in a colormap.
16727dd7cddfSDavid du Colombier<b><tt>maxDynamicColors</tt></b> controls the maximum
16737dd7cddfSDavid du Colombiernumber of colors that Ghostscript will allocate dynamically in the
16747dd7cddfSDavid du Colombiercolormap.
16757dd7cddfSDavid du Colombier</ul>
16767dd7cddfSDavid du Colombier
16773ff48bf5SDavid du Colombier<h4><a name="X_server_bugs"></a>Working around bugs in X servers</h4>
16787dd7cddfSDavid du Colombier
16797dd7cddfSDavid du Colombier<p>
16807dd7cddfSDavid du ColombierThe "<b><tt>use</tt></b>..." resources exist primarily to work around bugs
16817dd7cddfSDavid du Colombierin X servers.
16827dd7cddfSDavid du Colombier
16837dd7cddfSDavid du Colombier<ul>
16847dd7cddfSDavid du Colombier<li>    Old versions of DEC's X server (DECwindows) have bugs that
16857dd7cddfSDavid du Colombier        require setting <b><tt>useXPutImage</tt></b> or
16867dd7cddfSDavid du Colombier        <b><tt>useXSetTile</tt></b> to
16877dd7cddfSDavid du Colombier        <b><tt>false</tt></b>.
16887dd7cddfSDavid du Colombier
16897dd7cddfSDavid du Colombier<li>    Some servers do not implement backing pixmaps properly, or do not
16907dd7cddfSDavid du Colombier        have enough memory for them.  If you get strange behavior or "out
16917dd7cddfSDavid du Colombier        of memory" messages, try setting
16927dd7cddfSDavid du Colombier        <b><tt>useBackingPixmap</tt></b> to
16937dd7cddfSDavid du Colombier        <b><tt>false</tt></b>.
16947dd7cddfSDavid du Colombier
16957dd7cddfSDavid du Colombier<li>    Some servers do not implement tiling properly.  This appears
16967dd7cddfSDavid du Colombier        as broad bands of color where dither patterns should appear.  If
16977dd7cddfSDavid du Colombier        this happens, try setting
16987dd7cddfSDavid du Colombier        <b><tt>useXSetTile</tt></b> to
16997dd7cddfSDavid du Colombier        <b><tt>false</tt></b>.
17007dd7cddfSDavid du Colombier
17017dd7cddfSDavid du Colombier<li>    Some servers do not implement bitmap or pixmap displaying properly.
17027dd7cddfSDavid du Colombier        This may appear as white or black rectangles where characters
17037dd7cddfSDavid du Colombier        should appear; or characters may appear in "inverse video" (for
17047dd7cddfSDavid du Colombier        instance, white on a black rectangle rather than black on white).
17057dd7cddfSDavid du Colombier        If this happens, try setting
17067dd7cddfSDavid du Colombier        <b><tt>useXPutImage</tt></b> to
17077dd7cddfSDavid du Colombier        <b><tt>false</tt></b>.
17087dd7cddfSDavid du Colombier</ul>
17097dd7cddfSDavid du Colombier
17103ff48bf5SDavid du Colombier<h4><a name="X_fonts"></a>X fonts</h4>
17117dd7cddfSDavid du Colombier
17127dd7cddfSDavid du Colombier<p>
17137dd7cddfSDavid du ColombierTo use native X11 fonts, Ghostscript must map PostScript font names to the
17147dd7cddfSDavid du ColombierXLFD font names.  The resources <b><tt>regularFonts</tt></b>
17157dd7cddfSDavid du Colombier(fonts available in standard or ISO-Latin-1 encoding),
17167dd7cddfSDavid du Colombier<b><tt>symbolFonts</tt></b> (using Symbol encoding), and
17177dd7cddfSDavid du Colombier<b><tt>dingbatFonts</tt></b> (using Dingbat encoding) give
17187dd7cddfSDavid du Colombierthe name mapping for different encodings.  The XLFD font name in the
17197dd7cddfSDavid du Colombiermapping must contain 7 dashes; the X driver adds the additional size and
17207dd7cddfSDavid du Colombierencoding fields to bring the total number of dashes in the font name to 14.
17217dd7cddfSDavid du ColombierSee the appendix "<a href="#X_font_mappings">X default font mappings</a>"
17227dd7cddfSDavid du Colombierfor the full list of default mappings.
17237dd7cddfSDavid du Colombier
17247dd7cddfSDavid du Colombier<p>
17257dd7cddfSDavid du ColombierUsers who switch regularly between different X servers may wish to use the
17267dd7cddfSDavid du Colombier"*" wild card in place of the foundry name
17277dd7cddfSDavid du Colombier(<b><tt>itc</tt></b>,
17287dd7cddfSDavid du Colombier<b><tt>monotype</tt></b>,
17297dd7cddfSDavid du Colombier<b><tt>linotype</tt></b>,
17307dd7cddfSDavid du Colombier<b><tt>b&amp;h</tt></b>, or
17317dd7cddfSDavid du Colombier<b><tt>adobe</tt></b>); users who do not switch X servers
17327dd7cddfSDavid du Colombiershould leave the explicit foundry in the name, since it speeds up access to
17337dd7cddfSDavid du Colombierfonts.
17347dd7cddfSDavid du Colombier
17357dd7cddfSDavid du Colombier<p>
17367dd7cddfSDavid du ColombierGhostscript takes advantage of the "HP XLFD Enhancements," if available, to
17377dd7cddfSDavid du Colombieruse native X11 fonts for fonts that are anamorphically scaled, rotated, or
17387dd7cddfSDavid du Colombiermirrored.  If the changes have been installed to the X or font server, they
17397dd7cddfSDavid du Colombierare automatically used when appropriate.
17407dd7cddfSDavid du Colombier
17413ff48bf5SDavid du Colombier<h4><a name="GS_fonts_as_X_fonts"></a>Using Ghostscript fonts on X displays</h4>
17427dd7cddfSDavid du Colombier
17437dd7cddfSDavid du Colombier<p>
17447dd7cddfSDavid du ColombierFont files distributed with Ghostscript can be used on X Windows displays.
17457dd7cddfSDavid du ColombierYou can find full instructions in the
17467dd7cddfSDavid du Colombier<a href="Fonts.htm#Use_gs_fonts_with_X">documentation on fonts</a>.
17477dd7cddfSDavid du Colombier
17483ff48bf5SDavid du Colombier<h4><a name="X_device_parameters"></a>X device parameters</h4>
17497dd7cddfSDavid du Colombier
17507dd7cddfSDavid du Colombier<p>
17517dd7cddfSDavid du ColombierIn addition to the device parameters recognized by <a
17527dd7cddfSDavid du Colombierhref="Language.htm#Device_parameters">all devices</a>, Ghostscript's X
17537dd7cddfSDavid du Colombierdriver provides parameters to adjust its performance.  Users will rarely
17547dd7cddfSDavid du Colombierneed to modify these.  Note that these are parameters to be set with the
17557dd7cddfSDavid du Colombier<b><tt>-d</tt></b> switch in the command line (e.g.,
17567dd7cddfSDavid du Colombier<b><tt>-dMaxBitmap=10000000</tt></b>), not resources to be defined in the
17577dd7cddfSDavid du Colombier<b><tt>~/.Xdefaults</tt></b> file.
17587dd7cddfSDavid du Colombier
17597dd7cddfSDavid du Colombier<dl>
17607dd7cddfSDavid du Colombier<dt><b><tt>AlwaysUpdate &lt;boolean&gt;</tt></b>
17617dd7cddfSDavid du Colombier<dd>If <b><tt>true</tt></b>, the driver updates the screen after each
17627dd7cddfSDavid du Colombierprimitive drawing operation; if <b><tt>false</tt></b> (the default), the
17637dd7cddfSDavid du Colombierdriver uses an intelligent buffered updating algorithm.
17647dd7cddfSDavid du Colombier</dl>
17657dd7cddfSDavid du Colombier
17667dd7cddfSDavid du Colombier<dl>
17677dd7cddfSDavid du Colombier<dt><b><tt>MaxBitmap &lt;integer&gt;</tt></b>
17687dd7cddfSDavid du Colombier<dd>If the amount of memory required to hold the pixmap for the window is no
17697dd7cddfSDavid du Colombiermore than the value of <b><tt>MaxBitmap</tt></b>, the driver will draw to a
17707dd7cddfSDavid du Colombierpixmap in Ghostscript's address space (called a "client-side pixmap") and
17717dd7cddfSDavid du Colombierwill copy it to the screen from time to time; if the amount of memory
17727dd7cddfSDavid du Colombierrequired for the pixmap exceeds the value of <b><tt>MaxBitmap</tt></b>, the
17737dd7cddfSDavid du Colombierdriver will draw to a server pixmap.  Using a client-side pixmap usually
17747dd7cddfSDavid du Colombierprovides better performance -- for bitmap images, possibly much better
17757dd7cddfSDavid du Colombierperformance -- but since it may require quite a lot of RAM (e.g., about 2.2
17767dd7cddfSDavid du ColombierMb for a 24-bit 1024x768 window), the default value of
17777dd7cddfSDavid du Colombier<b><tt>MaxBitmap</tt></b> is 0.
17787dd7cddfSDavid du Colombier</dl>
17797dd7cddfSDavid du Colombier
17807dd7cddfSDavid du Colombier<dl>
17817dd7cddfSDavid du Colombier<dt><b><tt>MaxTempPixmap, MaxTempImage, MaxBufferedTotal, MaxBufferedArea,
17827dd7cddfSDavid du ColombierMaxBufferedCount &lt;integer&gt;</tt></b>
17837dd7cddfSDavid du Colombier<dd>These control various aspects of the driver's buffering behavior.  For
17847dd7cddfSDavid du Colombierdetails, please consult the source file <b><tt>gdevx.h</tt></b>.
17857dd7cddfSDavid du Colombier</dl>
17867dd7cddfSDavid du Colombier
17877dd7cddfSDavid du Colombier<hr>
17887dd7cddfSDavid du Colombier
17893ff48bf5SDavid du Colombier<h3><a name="SCO_Unix"></a>SCO Unix</h3>
17907dd7cddfSDavid du Colombier
17917dd7cddfSDavid du Colombier<p>
17927dd7cddfSDavid du ColombierBecause of bugs in the SCO Unix kernel, Ghostscript will not work if you
17937dd7cddfSDavid du Colombierselect direct screen output and also allow it to write messages on the
17947dd7cddfSDavid du Colombierconsole.  If you are using direct screen output, redirect Ghostscript's
17957dd7cddfSDavid du Colombierterminal output to a file.
17967dd7cddfSDavid du Colombier
17977dd7cddfSDavid du Colombier<hr>
17987dd7cddfSDavid du Colombier
1799*593dc095SDavid du Colombier<h2><a name="Options"></a>Command line options</h2>
18007dd7cddfSDavid du Colombier
18017dd7cddfSDavid du Colombier<p>
18027dd7cddfSDavid du ColombierUnless otherwise noted, these switches can be used on all platforms.
18037dd7cddfSDavid du Colombier
18043ff48bf5SDavid du Colombier<h3><a name="General_switches"></a>General switches</h3>
18057dd7cddfSDavid du Colombier
18063ff48bf5SDavid du Colombier<h4><a name="Input_control"></a>Input control</h4>
18077dd7cddfSDavid du Colombier
18087dd7cddfSDavid du Colombier<dl>
18097dd7cddfSDavid du Colombier<dt><b><tt>@</tt></b><em>filename</em>
18107dd7cddfSDavid du Colombier<dd>Causes Ghostscript to read <em>filename</em> and treat its contents the
1811*593dc095SDavid du Colombiersame as the command line.  (This was intended primarily for getting around
18127dd7cddfSDavid du ColombierDOS's 128-character limit on the length of a command line.)  Switches or
18137dd7cddfSDavid du Colombierfile names in the file may be separated by any amount of white space
18147dd7cddfSDavid du Colombier(space, tab, line break); there is no limit on the size of the file.
18157dd7cddfSDavid du Colombier</dl>
18167dd7cddfSDavid du Colombier
18177dd7cddfSDavid du Colombier<dl>
18187dd7cddfSDavid du Colombier<dt><b><tt>--</tt></b> <em>filename arg1 ...</em>
18197dd7cddfSDavid du Colombier<br><b><tt>-+</tt></b> <em>filename arg1 ...</em>
18207dd7cddfSDavid du Colombier<dd>Takes the next argument as a file name as usual, but takes all
18217dd7cddfSDavid du Colombierremaining arguments (even if they have the syntactic form of switches) and
18227dd7cddfSDavid du Colombierdefines the name <b><tt>ARGUMENTS</tt></b> in userdict (not systemdict) as
18237dd7cddfSDavid du Colombieran array of those strings, <em>before</em> running the file.  When
18247dd7cddfSDavid du ColombierGhostscript finishes executing the file, it exits back to the shell.
18257dd7cddfSDavid du Colombier</dl>
18267dd7cddfSDavid du Colombier
18277dd7cddfSDavid du Colombier<dl>
18287dd7cddfSDavid du Colombier<dt><b><tt>-@</tt></b> <em>filename arg1 ...</em>
18297dd7cddfSDavid du Colombier<dd>Does the same thing as <b><tt>--</tt></b> and <b><tt>-+</tt></b>, but
18307dd7cddfSDavid du Colombierexpands <b><tt>@</tt></b><em>filename</em> arguments.
18317dd7cddfSDavid du Colombier</dl>
18327dd7cddfSDavid du Colombier
18337dd7cddfSDavid du Colombier<dl>
18347dd7cddfSDavid du Colombier<dt><b><tt>-</tt></b>
18357dd7cddfSDavid du Colombier<br><b><tt>-_</tt></b>
18367dd7cddfSDavid du Colombier<dd>These are not really switches: they tell Ghostscript to read from
18377dd7cddfSDavid du Colombierstandard input, which is coming from a file or a pipe,
18387dd7cddfSDavid du Colombierwith or without buffering.
1839*593dc095SDavid du ColombierOn some systems, Ghostscript may read the input one character at a time,
1840*593dc095SDavid du Colombierwhich is useful for programs such as ghostview that generate input for
1841*593dc095SDavid du ColombierGhostscript dynamically and watch for some response, but can slow processing.
1842*593dc095SDavid du ColombierIf performance is significantly slower than with a named file,
1843*593dc095SDavid du Colombiertry '<tt>-_</tt>' which always reads the input in blocks.
1844*593dc095SDavid du ColombierHowever, '<tt>-</tt>' is equivalent on most systems.
18457dd7cddfSDavid du Colombier</dl>
18467dd7cddfSDavid du Colombier
18477dd7cddfSDavid du Colombier<dl>
18487dd7cddfSDavid du Colombier<dt><b><tt>-c</tt></b> <em>tokens ...</em>
18497dd7cddfSDavid du Colombier<dd>Interprets arguments as PostScript code up to the next argument that
18507dd7cddfSDavid du Colombierbegins with "<b><tt>-</tt></b>" followed by a non-digit, or with
18517dd7cddfSDavid du Colombier"<b><tt>@</tt></b>".  For example, if the file <b><tt>quit.ps</tt></b>
18527dd7cddfSDavid du Colombiercontains just the word "<b><tt>quit</tt></b>", then
18537dd7cddfSDavid du Colombier<b><tt>-c&nbsp;quit</tt></b> on the command line is equivalent to
18547dd7cddfSDavid du Colombier<b><tt>quit.ps</tt></b> there.  Each argument must be exactly one token, as
18557dd7cddfSDavid du Colombierdefined by the <b><tt>token</tt></b> operator.
18567dd7cddfSDavid du Colombier</dl>
18577dd7cddfSDavid du Colombier
18587dd7cddfSDavid du Colombier<dl>
18597dd7cddfSDavid du Colombier<dt><b><tt>-f</tt></b>
18607dd7cddfSDavid du Colombier<dd>Interprets following non-switch arguments as file names to be executed
18617dd7cddfSDavid du Colombierusing the normal <b><tt>run</tt></b> command.  Since this is the default
18627dd7cddfSDavid du Colombierbehavior, <b><tt>-f</tt></b> is useful only for terminating the list of
18637dd7cddfSDavid du Colombiertokens for the <b><tt>-c</tt></b> switch.
18647dd7cddfSDavid du Colombier</dl>
18657dd7cddfSDavid du Colombier
18667dd7cddfSDavid du Colombier<dl>
18677dd7cddfSDavid du Colombier<dt><b><tt>-f</tt></b><em>filename</em>
18687dd7cddfSDavid du Colombier<dd>Execute the given file, even if its name begins with a
18697dd7cddfSDavid du Colombier"<b><tt>-</tt></b>" or "<b><tt>@</tt></b>".
18707dd7cddfSDavid du Colombier</dl>
18717dd7cddfSDavid du Colombier
18723ff48bf5SDavid du Colombier<h4><a name="File_searching"></a>File searching</h4>
18737dd7cddfSDavid du Colombier
18747dd7cddfSDavid du Colombier<p>
18757dd7cddfSDavid du ColombierNote that by "library files" here we mean all the files identified using
18767dd7cddfSDavid du Colombierthe search rule under "<a href="#Finding_files">How Ghostscript finds
18777dd7cddfSDavid du Colombierfiles</a>" above: Ghostscript's own initialization files, fonts, and files
18787dd7cddfSDavid du Colombiernamed on the command line.
18797dd7cddfSDavid du Colombier
18807dd7cddfSDavid du Colombier<dl>
18817dd7cddfSDavid du Colombier<dt><a name="I_switch"></a><b><tt>-I</tt></b><em>directories</em>
18827dd7cddfSDavid du Colombier<dd>Adds the designated list of directories at the head of the search path
18837dd7cddfSDavid du Colombierfor library files.
18847dd7cddfSDavid du Colombier</dl>
18857dd7cddfSDavid du Colombier
18867dd7cddfSDavid du Colombier<dl>
18877dd7cddfSDavid du Colombier<dt><a name="P_switch"></a><b><tt>-P</tt></b>
18887dd7cddfSDavid du Colombier<dd>Makes Ghostscript look first in the current directory for library
18897dd7cddfSDavid du Colombierfiles.  This is currently the default.
18907dd7cddfSDavid du Colombier</dl>
18917dd7cddfSDavid du Colombier
18927dd7cddfSDavid du Colombier<dl>
18937dd7cddfSDavid du Colombier<dt><a name="P-_switch"></a><b><tt>-P-</tt></b>
18947dd7cddfSDavid du Colombier<dd>Makes Ghostscript <b><em>not</em></b> look first in the current
18957dd7cddfSDavid du Colombierdirectory for library files (unless, of course, the first explicitly
18967dd7cddfSDavid du Colombiersupplied directory is "<b><tt>.</tt></b>").
18977dd7cddfSDavid du Colombier</dl>
18987dd7cddfSDavid du Colombier
18993ff48bf5SDavid du Colombier<h4><a name="Parameters"></a>Setting parameters</h4>
19007dd7cddfSDavid du Colombier
19017dd7cddfSDavid du Colombier<dl>
19027dd7cddfSDavid du Colombier<dt><b><tt>-D</tt></b><em>name</em>
19037dd7cddfSDavid du Colombier<br><b><tt>-d</tt></b><em>name</em>
19047dd7cddfSDavid du Colombier<dd>Define a name in systemdict with value=true.
19057dd7cddfSDavid du Colombier</dl>
19067dd7cddfSDavid du Colombier
19077dd7cddfSDavid du Colombier<dl>
19087dd7cddfSDavid du Colombier<dt><b><tt>-D</tt></b><em>name</em><b><tt>=</tt></b><em>token</em>
19097dd7cddfSDavid du Colombier<br><b><tt>-d</tt></b><em>name</em><b><tt>=</tt></b><em>token</em>
19107dd7cddfSDavid du Colombier<dd>Define a name in systemdict with the given definition.  The token must
19117dd7cddfSDavid du Colombierbe exactly one token (as defined by the <b><tt>token</tt></b> operator) and
19127dd7cddfSDavid du Colombiermust not contain any whitespace.  If the token is a non-literal name, it
19137dd7cddfSDavid du Colombiermust be true, false, or null.
19147dd7cddfSDavid du Colombier</dl>
19157dd7cddfSDavid du Colombier
19167dd7cddfSDavid du Colombier<dl>
19177dd7cddfSDavid du Colombier<dt><b><tt>-S</tt></b><em>name</em><b><tt>=</tt></b><em>string</em>
19187dd7cddfSDavid du Colombier<br><b><tt>-s</tt></b><em>name</em><b><tt>=</tt></b><em>string</em>
19197dd7cddfSDavid du Colombier<dd>Define a name in systemdict with a given string as value.  This is
19207dd7cddfSDavid du Colombierdifferent from <b><tt>-d</tt></b>.  For example, <b><tt>-dXYZ=35</tt></b>
19217dd7cddfSDavid du Colombieron the command line is equivalent to the program fragment
19227dd7cddfSDavid du Colombier
19237dd7cddfSDavid du Colombier<blockquote><b><tt>
19247dd7cddfSDavid du Colombier/XYZ 35 def
19257dd7cddfSDavid du Colombier</tt></b></blockquote>
19267dd7cddfSDavid du Colombier
19277dd7cddfSDavid du Colombier<p>
19287dd7cddfSDavid du Colombierwhereas <b><tt>-sXYZ=35</tt></b> is equivalent to
19297dd7cddfSDavid du Colombier
19307dd7cddfSDavid du Colombier<blockquote><b><tt>
19317dd7cddfSDavid du Colombier/XYZ (35) def
19327dd7cddfSDavid du Colombier</tt></b></blockquote>
19337dd7cddfSDavid du Colombier</dl>
19347dd7cddfSDavid du Colombier
19357dd7cddfSDavid du Colombier<dl>
19367dd7cddfSDavid du Colombier<dt><b><tt>-u</tt></b><em>name</em>
19377dd7cddfSDavid du Colombier<dd>Un-define a name, cancelling <b><tt>-d</tt></b> or <b><tt>-s</tt></b>.
19387dd7cddfSDavid du Colombier</dl>
19397dd7cddfSDavid du Colombier
19407dd7cddfSDavid du Colombier<p>
19417dd7cddfSDavid du ColombierNote that the initialization file <b><tt>gs_init.ps</tt></b> makes
19427dd7cddfSDavid du Colombier<b><tt>systemdict</tt></b> read-only, so the values of names defined with
19437dd7cddfSDavid du Colombier<b><tt>-D</tt></b>, <b><tt>-d</tt></b>, <b><tt>-S</tt></b>, and
19447dd7cddfSDavid du Colombier<b><tt>-s</tt></b> cannot be changed -- although, of course, they can be
19453ff48bf5SDavid du Colombiersuperseded by definitions in <b><tt>userdict</tt></b> or other dictionaries.
19463ff48bf5SDavid du ColombierHowever, device parameters set this way (<b><tt>PageSize</tt></b>,
19473ff48bf5SDavid du Colombier<b><tt>Margins</tt></b>, etc.) are <em>not</em> read-only, and <em>can</em>
19483ff48bf5SDavid du Colombierbe changed by code in PostScript files.
19497dd7cddfSDavid du Colombier
19507dd7cddfSDavid du Colombier<dl>
19517dd7cddfSDavid du Colombier<dt><b><tt>-g</tt></b><em>number1</em><b><tt>x</tt></b><em>number2</em>
19527dd7cddfSDavid du Colombier<dd>Equivalent to <b><tt>-dDEVICEWIDTH=</tt></b><em>number1</em> and
19537dd7cddfSDavid du Colombier<b><tt>-dDEVICEHEIGHT=</tt></b><em>number2</em>, specifying the device
19547dd7cddfSDavid du Colombierwidth and height in pixels for the benefit of devices such as X11 windows
19557dd7cddfSDavid du Colombierand VESA displays that require (or allow) you to specify width and height.
19567dd7cddfSDavid du ColombierNote that this causes documents of other sizes to be clipped, not scaled:
19577dd7cddfSDavid du Colombiersee <b><tt>-dFIXEDMEDIA</tt></b> below.
19587dd7cddfSDavid du Colombier</dl>
19597dd7cddfSDavid du Colombier
19607dd7cddfSDavid du Colombier<dl>
19617dd7cddfSDavid du Colombier<dt><a name="Resolution_switch"></a><b><tt>-r</tt></b><em>number</em> (same
19627dd7cddfSDavid du Colombieras <b><tt>-r</tt></b><em>number</em><b><tt>x</tt></b><em>number</em>)
19637dd7cddfSDavid du Colombier<br><b><tt>-r</tt></b><em>number1</em><b><tt>x</tt></b><em>number2</em>
19647dd7cddfSDavid du Colombier<dd>Equivalent to <b><tt>-dDEVICEXRESOLUTION=</tt></b><em>number1</em> and
19657dd7cddfSDavid du Colombier<b><tt>-dDEVICEYRESOLUTION=</tt></b><em>number2</em>, specifying the device
19667dd7cddfSDavid du Colombierhorizontal and vertical resolution in pixels per inch for the benefit of
19677dd7cddfSDavid du Colombierdevices such as printers that support multiple X and Y resolutions.
19687dd7cddfSDavid du Colombier</dl>
19697dd7cddfSDavid du Colombier
19703ff48bf5SDavid du Colombier<h4><a name="Quiet"></a>Suppress messages</h4>
19717dd7cddfSDavid du Colombier
19727dd7cddfSDavid du Colombier<dl>
19737dd7cddfSDavid du Colombier<dt><a name="Quiet"></a><b><tt>-q</tt></b>
19747dd7cddfSDavid du Colombier<dd>Quiet startup: suppress normal startup messages, and also do the
19757dd7cddfSDavid du Colombierequivalent of <a href="#dQUIET"><b><tt>-dQUIET</tt></b></a>.
19767dd7cddfSDavid du Colombier</dl>
19777dd7cddfSDavid du Colombier
19783ff48bf5SDavid du Colombier<h3><a name="Parameter_switches"></a>Parameter switches (<b><tt>-d</tt></b> and <b><tt>-s</tt></b>)</h3>
19797dd7cddfSDavid du Colombier
19807dd7cddfSDavid du Colombier<p>
19817dd7cddfSDavid du ColombierAs noted above, <b><tt>-d</tt></b> and <b><tt>-s</tt></b> define initial
19827dd7cddfSDavid du Colombiervalues for PostScript names.  Some of these names are parameters that
19837dd7cddfSDavid du Colombiercontrol the interpreter or the graphics engine.  You can also use
19847dd7cddfSDavid du Colombier<b><tt>-d</tt></b> or <b><tt>-s</tt></b> to define a value for any device
19857dd7cddfSDavid du Colombierparameter of the initial device (the one defined with
19867dd7cddfSDavid du Colombier<b><tt>-sDEVICE=</tt></b>, or the default device if this switch is not
19877dd7cddfSDavid du Colombierused).  For example, since the <b><tt>ppmraw</tt></b> device has a numeric
19887dd7cddfSDavid du Colombier<b><tt>GrayValues</tt></b> parameter that controls the number of bits per
19897dd7cddfSDavid du Colombiercomponent, <b><tt>-sDEVICE=ppmraw -dGrayValues=16</tt></b> will make this
19907dd7cddfSDavid du Colombierthe default device and set the number of bits per component to 4 (log2(16)).
19917dd7cddfSDavid du Colombier
19923ff48bf5SDavid du Colombier<h4><a name="Rendering_parameters"></a>Rendering parameters</h4>
19937dd7cddfSDavid du Colombier
19947dd7cddfSDavid du Colombier<dl>
19957dd7cddfSDavid du Colombier<dt><b><tt>-dCOLORSCREEN
19967dd7cddfSDavid du Colombier<br>-dCOLORSCREEN=0
19977dd7cddfSDavid du Colombier<br>-dCOLORSCREEN=false</tt></b>
19987dd7cddfSDavid du Colombier<dd>On high-resolution devices (at least 150 dpi resolution, or
19997dd7cddfSDavid du Colombier<b><tt>-dDITHERPPI</tt></b> specified), <b><tt>-dCOLORSCREEN</tt></b>
20007dd7cddfSDavid du Colombierforces the use of separate halftone screens with different angles for CMYK
20017dd7cddfSDavid du Colombieror RGB if halftones are needed (this produces the best-quality output);
20027dd7cddfSDavid du Colombier<b><tt>-dCOLORSCREEN=0</tt></b> uses separate screens with the same
20037dd7cddfSDavid du Colombierfrequency and angle; <b><tt>-dCOLORSCREEN=false</tt></b> forces the use of
20047dd7cddfSDavid du Colombiera single binary screen.  The default if <b><tt>COLORSCREEN</tt></b> is not
20057dd7cddfSDavid du Colombierspecified is to use separate screens with different angles if the device
20067dd7cddfSDavid du Colombierhas fewer than 5 bits per color, and a single binary screen (which is never
20077dd7cddfSDavid du Colombieractually used under normal circumstances) on all other devices.
20087dd7cddfSDavid du Colombier</dl>
20097dd7cddfSDavid du Colombier
20107dd7cddfSDavid du Colombier<dl>
20117dd7cddfSDavid du Colombier<dt><b><tt>-dDITHERPPI=</tt></b><em>lpi</em>
20127dd7cddfSDavid du Colombier<dd>Forces all devices to be considered high-resolution, and forces use of
20137dd7cddfSDavid du Colombiera halftone screen or screens with <em>lpi</em> lines per inch, disregarding
20147dd7cddfSDavid du Colombierthe actual device resolution.  Reasonable values for <em>lpi</em> are
20157dd7cddfSDavid du Colombier<b><em>N</em></b>/5 to <b><em>N</em></b>/20, where <b><em>N</em></b> is the
20167dd7cddfSDavid du Colombierresolution in dots per inch.
20177dd7cddfSDavid du Colombier</dl>
20187dd7cddfSDavid du Colombier
20197dd7cddfSDavid du Colombier<dl>
20207dd7cddfSDavid du Colombier<dt><b><tt>-dDOINTERPOLATE</tt></b>
20217dd7cddfSDavid du Colombier<dd>Turns on image interpolation for all images, improving image quality for
20227dd7cddfSDavid du Colombierscaled images at the expense of speed.  Note that
20237dd7cddfSDavid du Colombier<b><tt>-dNOINTERPOLATE</tt></b> overrides <b><tt>-dDOINTERPOLATE</tt></b> if
20247dd7cddfSDavid du Colombierboth are specified.
20257dd7cddfSDavid du Colombier</dl>
20267dd7cddfSDavid du Colombier
20277dd7cddfSDavid du Colombier<dl>
2028*593dc095SDavid du Colombier<dt><b><tt>-dTextAlphaBits=</tt></b><em>n</em>
2029*593dc095SDavid du Colombier<dt><b><tt>-dGraphicsAlphaBits=</tt></b><em>n</em>
2030*593dc095SDavid du Colombier<dd>These options control the use of subsample antialiasing. Their use is highly recommended for producing high quality rasterizations. The subsampling box size <em>n</em> should be 4 for optimum output, but smaller values can be used for faster rendering. Antialiasing is enabled separately for text and graphics content.
2031*593dc095SDavid du ColombierAllowed values are 1, 2 or 4.
2032*593dc095SDavid du Colombier<p>
2033*593dc095SDavid du ColombierNote that because of the way antialiasing blends the edges of shapes into the background when
2034*593dc095SDavid du Colombierthey are drawn some files that rely on joining separate filled polygons together to cover
2035*593dc095SDavid du Colombieran area may not render as expected with <tt>GraphicsAlphaBits</tt> at 2 or 4. If you encounter
2036*593dc095SDavid du Colombierstrange lines within solid areas, try rendering that file again with
2037*593dc095SDavid du Colombier<tt>-dGraphicsAlphaBits=1</tt>.
2038*593dc095SDavid du Colombier</dl>
2039*593dc095SDavid du Colombier
2040*593dc095SDavid du Colombier<dl>
2041*593dc095SDavid du Colombier<dt><b><tt>-dAlignToPixels=</tt></b><em>n</em>
2042*593dc095SDavid du Colombier<dd>Chooses glyph alignent to integral pixel boundaries (if set to the value 1)
2043*593dc095SDavid du Colombieror to subpixels (value 0). Subpixels are a smaller raster grid
2044*593dc095SDavid du Colombierwhich is used internally for text antialiasing.
2045*593dc095SDavid du ColombierThe number of subpixels in a pixel usually is <tt>2^TextAlphaBits</tt>,
2046*593dc095SDavid du Colombierbut this may be automatically reduced for big characters to save space
2047*593dc095SDavid du Colombierin character cache.
2048*593dc095SDavid du Colombier
2049*593dc095SDavid du Colombier<p>
2050*593dc095SDavid du ColombierThe parameter has no effect if <b><tt>-dTextAlphaBits=1</tt></b>.
2051*593dc095SDavid du ColombierDefault value is 0.
2052*593dc095SDavid du Colombier
2053*593dc095SDavid du Colombier<p>
2054*593dc095SDavid du ColombierSetting <b><tt>-dAlignToPixels=0</tt></b> can improve rendering
2055*593dc095SDavid du Colombierof poorly hinted fonts, but may impair the appearance of well-hinted fonts.
2056*593dc095SDavid du Colombier</dl>
2057*593dc095SDavid du Colombier
2058*593dc095SDavid du Colombier<dl>
2059*593dc095SDavid du Colombier<dt><b><tt>-dGridFitTT=</tt></b><em>n</em>
2060*593dc095SDavid du Colombier<dd> This specifies the initial value for the implementation specific
2061*593dc095SDavid du Colombieruser parameter <a href="Language.htm#GridFitTT">GridFitTT</a>.
2062*593dc095SDavid du ColombierIt controls grid fitting of True Type fonts
2063*593dc095SDavid du Colombier(Sometimes referred to as "hinting", but strictly speaking
2064*593dc095SDavid du Colombierthe latter is a feature of Type 1 fonts).
2065*593dc095SDavid du ColombierSetting this to 2 enables automatic grid fitting for True Type glyphs.
2066*593dc095SDavid du ColombierThe value 0 disables grid fitting. The default value is 2.
2067*593dc095SDavid du ColombierFor more information see the description of the user parameter
2068*593dc095SDavid du Colombier<a href="Language.htm#GridFitTT">GridFitTT</a>.
2069*593dc095SDavid du Colombier
2070*593dc095SDavid du Colombier</dl>
2071*593dc095SDavid du Colombier
2072*593dc095SDavid du Colombier<dl>
2073*593dc095SDavid du Colombier<dt><b><tt>-dUseCIEColor</tt></b>
2074*593dc095SDavid du Colombier<dd>Set UseCIEColor in the page device dictionary, remapping device-dependent
2075*593dc095SDavid du Colombiercolor values through a CIE color space. This can can improve conversion
2076*593dc095SDavid du Colombierof CMYK documents to RGB.
2077*593dc095SDavid du Colombier</dl>
2078*593dc095SDavid du Colombier
2079*593dc095SDavid du Colombier<dl>
20807dd7cddfSDavid du Colombier<dt><b><tt>-dNOCIE</tt></b>
20817dd7cddfSDavid du Colombier<dd>Substitutes <b><tt>DeviceGray</tt></b> and <b><tt>DeviceRGB</tt></b>
20827dd7cddfSDavid du Colombierfor CIEBasedA and CIEBasedABC color spaces respectively.  Useful only on
20837dd7cddfSDavid du Colombiervery slow systems where color accuracy is less important.
20847dd7cddfSDavid du Colombier</dl>
20857dd7cddfSDavid du Colombier
20867dd7cddfSDavid du Colombier<dl>
2087*593dc095SDavid du Colombier<dt><b><tt>-dNOSUBSTDEVICECOLORS</tt></b>
2088*593dc095SDavid du Colombier<dd>This switch prevents the substitution of the <b><tt>ColorSpace</tt></b>
2089*593dc095SDavid du Colombierresources (<b><tt>DefaultGray</tt></b>, <b><tt>DefaultRGB</tt></b>, and
2090*593dc095SDavid du Colombier<b><tt>DefaultCMYK</tt></b>) for the <b><tt>DeviceGray</tt></b>,
2091*593dc095SDavid du Colombier<b><tt>DeviceRGB</tt></b>, and <b><tt>DeviceCMYK</tt></b> color spaces.
2092*593dc095SDavid du ColombierThis switch is primarily useful for PDF creation using the <tt><b>pdfwrite</b></tt>
2093*593dc095SDavid du Colombierdevice when retaining the color spaces from the original document is
2094*593dc095SDavid du Colombierimportant.
2095*593dc095SDavid du Colombier</dl>
2096*593dc095SDavid du Colombier
2097*593dc095SDavid du Colombier<dl>
2098*593dc095SDavid du Colombier<dt><b><tt>-dNOPSICC</tt></b>
2099*593dc095SDavid du Colombier<dd>Disables the automatic loading and use of an input color space that is
2100*593dc095SDavid du Colombiercontained in a PostScript file as DSC comments starting with the %%BeginICCProfile:
2101*593dc095SDavid du Colombiercomment. ICC profiles are sometimes embedded by applications to convey the exact
2102*593dc095SDavid du Colombierinput color space allowing better color fidelity. Since the embedded ICC profiles
2103*593dc095SDavid du Colombieroften use multidimensional RenderTables, color conversion may be slower than using
2104*593dc095SDavid du Colombierthe Default color conversion invoked when the <b><tt>-dUseCIEColor</tt></b>
2105*593dc095SDavid du Colombieroption is specified, therefore the <b><tt>-dNOPSICC</tt></b> option may result
2106*593dc095SDavid du Colombierin improved performance at slightly reduced color fidelity.
2107*593dc095SDavid du Colombier</dl>
2108*593dc095SDavid du Colombier
2109*593dc095SDavid du Colombier<dl>
21107dd7cddfSDavid du Colombier<dt><b><tt>-dNOINTERPOLATE</tt></b>
21117dd7cddfSDavid du Colombier<dd>Turns off image interpolation, improving performance on interpolated
21127dd7cddfSDavid du Colombierimages at the expense of image quality.  <b><tt>-dNOINTERPOLATE</tt></b>
21137dd7cddfSDavid du Colombieroverrides <b><tt>-dDOINTERPOLATE</tt></b>.
21147dd7cddfSDavid du Colombier</dl>
21157dd7cddfSDavid du Colombier
2116*593dc095SDavid du Colombier<dl>
2117*593dc095SDavid du Colombier<dt><b><tt>-dNOTRANSPARENCY</tt></b>
2118*593dc095SDavid du Colombier<dd>Turns off PDF 1.4 transparency, resulting in faster (but possibly
2119*593dc095SDavid du Colombierincorrect) rendering of pages containing PDF 1.4 transparency and
2120*593dc095SDavid du Colombierblending.
2121*593dc095SDavid du Colombier</dl>
2122*593dc095SDavid du Colombier
2123*593dc095SDavid du Colombier<dl>
2124*593dc095SDavid du Colombier<dt><b><tt>-dNO_TN5044</tt></b>
2125*593dc095SDavid du Colombier<dd>Turns off the TN 5044 psuedo operators. These psuedo operators are not a part
2126*593dc095SDavid du Colombierof the official Postscript specification. However they are defined in <i>Technical
2127*593dc095SDavid du ColombierNote #5044 Color Separation Conventions for PostScript Language Programs</i>.
2128*593dc095SDavid du ColombierThese psuedo operators are required for some files from QuarkXPress. However some
2129*593dc095SDavid du Colombierfiles from Corel 9 and Illustrator 88 do not operate properly if these operators
2130*593dc095SDavid du Colombierare present.
2131*593dc095SDavid du Colombier</dl>
2132*593dc095SDavid du Colombier
2133*593dc095SDavid du Colombier<dl>
2134*593dc095SDavid du Colombier<dt><b><tt>-dDOPS</tt></b>
2135*593dc095SDavid du Colombier<dd>Enables processing of DoPS directives in PDF files. DoPS has in
2136*593dc095SDavid du Colombierfact been deprecated for some time. Use of this option is not
2137*593dc095SDavid du Colombierrecommended in security-conscious applications, as it increases the
2138*593dc095SDavid du Colombierscope for malicious code. <b><tt>-dDOPS</tt></b> has no effect on
2139*593dc095SDavid du Colombierprocessing of PostScript source files. Note: in releases 7.30 and
2140*593dc095SDavid du Colombierearlier, processing of DoPS was always enabled.
2141*593dc095SDavid du Colombier</dl>
2142*593dc095SDavid du Colombier
21433ff48bf5SDavid du Colombier<h4><a name="Page_parameters"></a>Page parameters</h4>
21447dd7cddfSDavid du Colombier
21457dd7cddfSDavid du Colombier<dl>
21467dd7cddfSDavid du Colombier<dt><a name="FIXEDMEDIA"></a><b><tt>-dFIXEDMEDIA</tt></b>
21477dd7cddfSDavid du Colombier<dd>Causes the media size to be fixed after initialization, forcing pages
21487dd7cddfSDavid du Colombierof other sizes or orientations to be clipped.  This may be useful when
21497dd7cddfSDavid du Colombierprinting documents on a printer that can handle their requested paper size
21507dd7cddfSDavid du Colombierbut whose default is some other size.  Note that <b><tt>-g</tt></b>
21517dd7cddfSDavid du Colombierautomatically sets <b><tt>-dFIXEDMEDIA</tt></b>, but
21527dd7cddfSDavid du Colombier<b><tt>-sPAPERSIZE=</tt></b> does not.
21537dd7cddfSDavid du Colombier</dl>
21547dd7cddfSDavid du Colombier
21557dd7cddfSDavid du Colombier<dl>
21567dd7cddfSDavid du Colombier<dt><b><tt>-dFIXEDRESOLUTION</tt></b>
21577dd7cddfSDavid du Colombier<dd>Causes the media resolution to be fixed similarly.  <b><tt>-r</tt></b>
21587dd7cddfSDavid du Colombierautomatically sets <b><tt>-dFIXEDRESOLUTION</tt></b>.
21597dd7cddfSDavid du Colombier</dl>
21607dd7cddfSDavid du Colombier
21617dd7cddfSDavid du Colombier<dl>
21627dd7cddfSDavid du Colombier<dt><b><tt>-dORIENT1=true
21637dd7cddfSDavid du Colombier<br>-dORIENT1=false</tt></b>
21647dd7cddfSDavid du Colombier<dd>Defines the meaning of the 0 and 1 orientation values for the
21657dd7cddfSDavid du Colombiersetpage[params] compatibility operators.  The default value of
21667dd7cddfSDavid du Colombier<b><tt>ORIENT1</tt></b> is true (set in <b><tt>gs_init.ps</tt></b>), which
21677dd7cddfSDavid du Colombieris the correct value for most files that use setpage[params] at all,
21687dd7cddfSDavid du Colombiernamely, files produced by badly designed applications that "know" that the
21697dd7cddfSDavid du Colombieroutput will be printed on certain roll-media printers: these applications
21707dd7cddfSDavid du Colombieruse 0 to mean landscape and 1 to mean portrait.
21717dd7cddfSDavid du Colombier<b><tt>-dORIENT1=false</tt></b> declares that 0 means portrait and 1 means
21727dd7cddfSDavid du Colombierlandscape, which is the convention used by a smaller number of files
21737dd7cddfSDavid du Colombierproduced by properly written applications.
21747dd7cddfSDavid du Colombier</dl>
21757dd7cddfSDavid du Colombier
21763ff48bf5SDavid du Colombier<dl>
21773ff48bf5SDavid du Colombier<dt><b><tt>-dDEVICEWIDTHPOINTS=</tt></b><em>w</em>
21783ff48bf5SDavid du Colombier<br><b><tt>-dDEVICEHEIGHTPOINTS=</tt></b><em>h</em>
21793ff48bf5SDavid du Colombier<dd>Sets the initial page width to <em>w</em> or initial page height to
21803ff48bf5SDavid du Colombier<em>h</em> respectively, specified in 1/72" units.
21813ff48bf5SDavid du Colombier</dl>
21823ff48bf5SDavid du Colombier
2183*593dc095SDavid du Colombier<dl>
2184*593dc095SDavid du Colombier<dt><b><tt>-sDEFAULTPAPERSIZE=</tt></b><em>a4</em>
2185*593dc095SDavid du Colombier<dd>
2186*593dc095SDavid du ColombierThis value will be used to replace the device default papersize ONLY
2187*593dc095SDavid du Colombierif the default papersize for the device is 'letter' or 'a4' serving
2188*593dc095SDavid du Colombierto insulate users of A4 or 8.5x11 from particular device defaults
2189*593dc095SDavid du Colombier(the collection of contributed drivers in Ghostscript vary as to
2190*593dc095SDavid du Colombierthe default size).
2191*593dc095SDavid du Colombier</dd>
2192*593dc095SDavid du Colombier</dl>
2193*593dc095SDavid du Colombier
21943ff48bf5SDavid du Colombier<h4><a name="Font_related_parameters"></a>Font-related parameters</h4>
21957dd7cddfSDavid du Colombier
21967dd7cddfSDavid du Colombier<dl>
21977dd7cddfSDavid du Colombier<dt><a name="DISKFONTS"></a><b><tt>-dDISKFONTS</tt></b>
21987dd7cddfSDavid du Colombier<dd>Causes individual character outlines to be loaded from the disk the
21997dd7cddfSDavid du Colombierfirst time they are encountered.  (Normally Ghostscript loads all the
22007dd7cddfSDavid du Colombiercharacter outlines when it loads a font.)  This may allow loading more
22017dd7cddfSDavid du Colombierfonts into memory at the expense of slower rendering.
22027dd7cddfSDavid du Colombier<b><tt>DISKFONTS</tt></b> is effective only if the diskfont feature was
22037dd7cddfSDavid du Colombierbuilt into the executable; otherwise it is ignored.
22047dd7cddfSDavid du Colombier</dl>
22057dd7cddfSDavid du Colombier
22067dd7cddfSDavid du Colombier<dl>
22077dd7cddfSDavid du Colombier<dt><b><tt>-dLOCALFONTS</tt></b>
22087dd7cddfSDavid du Colombier<dd>Causes Type 1 fonts to be loaded into the current VM -- normally local
22097dd7cddfSDavid du ColombierVM -- instead of always being loaded into global VM.  Useful only for
22107dd7cddfSDavid du Colombiercompatibility with Adobe printers for loading some obsolete fonts.
22117dd7cddfSDavid du Colombier</dl>
22127dd7cddfSDavid du Colombier
22137dd7cddfSDavid du Colombier<dl>
22143ff48bf5SDavid du Colombier<dt><b><tt>-dNOCCFONTS</tt></b>
22153ff48bf5SDavid du Colombier<dd>Suppresses the use of fonts precompiled into the Ghostscript executable.
22163ff48bf5SDavid du ColombierSee <a href="Fonts.htm#Precompiling">"Precompiling fonts"</a> in the
22173ff48bf5SDavid du Colombierdocumentation on fonts for details.  This is probably useful only for
22183ff48bf5SDavid du Colombierdebugging.
22193ff48bf5SDavid du Colombier</dl>
22203ff48bf5SDavid du Colombier
22213ff48bf5SDavid du Colombier<dl>
22227dd7cddfSDavid du Colombier<dt><a name="FONTMAP_switch"></a><b><tt>-dNOFONTMAP</tt></b>
22237dd7cddfSDavid du Colombier<dd>Suppresses the normal loading of the Fontmap file.  This may be useful
22247dd7cddfSDavid du Colombierin environments without a file system.
22257dd7cddfSDavid du Colombier</dl>
22267dd7cddfSDavid du Colombier
22277dd7cddfSDavid du Colombier<dl>
22287dd7cddfSDavid du Colombier<dt><b><tt>-dNOFONTPATH</tt></b>
22297dd7cddfSDavid du Colombier<dd>Suppresses consultation of <b><tt>GS_FONTPATH</tt></b>.  This may be
22307dd7cddfSDavid du Colombieruseful for debugging.
22317dd7cddfSDavid du Colombier</dl>
22327dd7cddfSDavid du Colombier
22337dd7cddfSDavid du Colombier<dl>
22347dd7cddfSDavid du Colombier<dt><b><tt>-dNOPLATFONTS</tt></b>
22357dd7cddfSDavid du Colombier<dd>Disables the use of fonts supplied by the underlying platform (X
22367dd7cddfSDavid du ColombierWindows or Microsoft Windows).  This may be needed if the platform fonts
22377dd7cddfSDavid du Colombierlook undesirably different from the scalable fonts.
22387dd7cddfSDavid du Colombier</dl>
22397dd7cddfSDavid du Colombier
22407dd7cddfSDavid du Colombier<dl>
22417dd7cddfSDavid du Colombier<dt><b><tt>-sFONTMAP=</tt></b><em>filename1</em><b><tt>;</tt></b><em>filename2</em><b><tt>;</tt></b><em>...</em>
22427dd7cddfSDavid du Colombier<dd>Specifies alternate name or names for the Fontmap file.  Note that the
22437dd7cddfSDavid du Colombiernames are separated by "<b><tt>:</tt></b>" on Unix systems, by
2244*593dc095SDavid du Colombier"<b><tt>;</tt></b>" on MS Windows systems, and by
22457dd7cddfSDavid du Colombier"<b><tt>,</tt></b>" on VMS systems, just as for search paths.
22467dd7cddfSDavid du Colombier</dl>
22477dd7cddfSDavid du Colombier
22487dd7cddfSDavid du Colombier<dl>
22497dd7cddfSDavid du Colombier<dt><b><tt>-sFONTPATH=</tt></b><em>dir1</em><b><tt>;</tt></b><em>dir2</em><b><tt>;</tt></b><em>...</em>
22507dd7cddfSDavid du Colombier<dd>Specifies a list of directories that will be scanned when looking for
22517dd7cddfSDavid du Colombierfonts not found on the search path, overriding the environment variable
22527dd7cddfSDavid du Colombier<b><tt>GS_FONTPATH</tt></b>.
22537dd7cddfSDavid du Colombier</dl>
22547dd7cddfSDavid du Colombier
22557dd7cddfSDavid du Colombier<dl>
22567dd7cddfSDavid du Colombier<dt><b><tt>-sSUBSTFONT=</tt></b><em>fontname</em>
22577dd7cddfSDavid du Colombier<dd>Causes the given font to be substituted for all unknown fonts, instead
22587dd7cddfSDavid du Colombierof using the normal intelligent substitution algorithm.  Also, in this
22597dd7cddfSDavid du Colombiercase, the font returned by <b><tt>findfont</tt></b> is the actual font
2260*593dc095SDavid du Colombiernamed <em>fontname</em>, not a copy of the font with its
22617dd7cddfSDavid du Colombier<b><tt>FontName</tt></b> changed to the requested one.
2262*593dc095SDavid du ColombierTHIS OPTION SHOULD NOT BE USED WITH HIGH LEVEL DEVICES, such as
2263*593dc095SDavid du Colombier<b><tt>pdfwrite</tt></b>, because it prevents such devices from
2264*593dc095SDavid du Colombierproviding the original font names in the output document. The
2265*593dc095SDavid du Colombierfont specified (<em>fontname</em>) will be embedded instead,
2266*593dc095SDavid du Colombierlimiting all future users of the document to the same approximate
2267*593dc095SDavid du Colombierrendering.
22687dd7cddfSDavid du Colombier</dl>
22697dd7cddfSDavid du Colombier
2270*593dc095SDavid du Colombier<h4><a name="Resource_related_parameters"></a>Resource-related parameters</h4>
2271*593dc095SDavid du Colombier
2272*593dc095SDavid du Colombier<dl>
2273*593dc095SDavid du Colombier<dt><a name="GenericResourceDir"></a><b><tt>-sGenericResourceDir=path</tt></b>
2274*593dc095SDavid du Colombier<dd>Specifies a path to resource files.
2275*593dc095SDavid du ColombierThe value is platform dependent. It must end with a directory separator.
2276*593dc095SDavid du Colombier<p>
2277*593dc095SDavid du ColombierAdobe specifies <b><tt>GenericResourceDir</tt></b> to be an absolute path
2278*593dc095SDavid du Colombierto a single resource directory. Ghostscript instead maintains
2279*593dc095SDavid du Colombiermultiple resource directories and uses an extended method for finding
2280*593dc095SDavid du Colombierresources, which is explained in
2281*593dc095SDavid du Colombier<a href="PS_resources">"Finding PostScript Level 2 resources"</a>.
2282*593dc095SDavid du Colombier<p>
2283*593dc095SDavid du ColombierDue to the extended search method, Ghostscript uses <b><tt>GenericResourceDir</tt></b>
2284*593dc095SDavid du Colombieronly as a default directory for resources being not installed.
2285*593dc095SDavid du ColombierTherefore <b><tt>GenericResourceDir</tt></b> may be considered as a place
2286*593dc095SDavid du Colombierwhere new resources to be installed. The default implementation of the function
2287*593dc095SDavid du Colombier<b><tt>ResourceFileName</tt></b> uses <b><tt>GenericResourceDir</tt></b> when
2288*593dc095SDavid du Colombier(1) it is an absolute path, or (2) the resource file is absent.
2289*593dc095SDavid du ColombierThe extended search method does not call <b><tt>ResourceFileName</tt></b> .
2290*593dc095SDavid du Colombier<p>
2291*593dc095SDavid du ColombierDefault value is <tt><b>(./Resource/)</b></tt> for Unix, and an equivalent one on other
2292*593dc095SDavid du Colombierplatforms.
2293*593dc095SDavid du Colombier</dl>
2294*593dc095SDavid du Colombier
2295*593dc095SDavid du Colombier<dl>
2296*593dc095SDavid du Colombier<dt><a name="FontResourceDir"></a><b><tt>-sFontResourceDir=path</tt></b>
2297*593dc095SDavid du Colombier<dd>Specifies a path where font files are installed.
2298*593dc095SDavid du ColombierIt's meaning is similar to <b><tt>GenericResourceDir</tt></b>.
2299*593dc095SDavid du Colombier
2300*593dc095SDavid du Colombier<p>
2301*593dc095SDavid du ColombierDefault value is <tt><b>(./Font/)</b></tt> for Unix, and an equivalent one on other
2302*593dc095SDavid du Colombierplatforms.
2303*593dc095SDavid du Colombier</dl>
2304*593dc095SDavid du Colombier
2305*593dc095SDavid du Colombier
2306*593dc095SDavid du Colombier
23073ff48bf5SDavid du Colombier<h4><a name="Interaction_related_parameters"></a>Interaction-related parameters</h4>
23087dd7cddfSDavid du Colombier
23097dd7cddfSDavid du Colombier<dl>
23107dd7cddfSDavid du Colombier<dt><b><tt>-dBATCH</tt></b>
23117dd7cddfSDavid du Colombier<dd>Causes Ghostscript to exit after processing all files named on the
23127dd7cddfSDavid du Colombiercommand line, rather than going into an interactive loop reading PostScript
23137dd7cddfSDavid du Colombiercommands.  Equivalent to putting -c quit at the end of the command line.
23147dd7cddfSDavid du Colombier</dl>
23157dd7cddfSDavid du Colombier
23167dd7cddfSDavid du Colombier<dl>
23177dd7cddfSDavid du Colombier<dt><b><tt>-dNOPAGEPROMPT</tt></b>
23187dd7cddfSDavid du Colombier<dd>Disables only the prompt, but not the pause, at the end of each page.
23197dd7cddfSDavid du ColombierThis may be useful on PC displays that get confused if a program attempts
23207dd7cddfSDavid du Colombierto write text to the console while the display is in a graphics mode.
23217dd7cddfSDavid du Colombier</dl>
23227dd7cddfSDavid du Colombier
23237dd7cddfSDavid du Colombier<dl>
23247dd7cddfSDavid du Colombier<dt><a name="NoPause"></a><b><tt>-dNOPAUSE</tt></b>
23257dd7cddfSDavid du Colombier<dd>Disables the prompt and pause at the end of each page.  Normally one
23267dd7cddfSDavid du Colombiershould use this (along with <b><tt>-dBATCH</tt></b>) when producing output
23277dd7cddfSDavid du Colombieron a printer or to a file; it also may be desirable for applications where
23287dd7cddfSDavid du Colombieranother program is "driving" Ghostscript.
23297dd7cddfSDavid du Colombier</dl>
23307dd7cddfSDavid du Colombier
23317dd7cddfSDavid du Colombier<dl>
23327dd7cddfSDavid du Colombier<dt><b><tt>-dNOPROMPT</tt></b>
23337dd7cddfSDavid du Colombier<dd>Disables the prompt printed by Ghostscript when it expects interactive
23347dd7cddfSDavid du Colombierinput, as well as the end-of-page prompt (<b><tt>-dNOPAGEPROMPT</tt></b>);
23357dd7cddfSDavid du Colombieralso disables the implicit <b><tt>flushpage</tt></b> that normally occurs
23367dd7cddfSDavid du Colombiereach time Ghostscript asks for more input.  This allows piping input
23377dd7cddfSDavid du Colombierdirectly into Ghostscript, as long as the data doesn't refer to
23387dd7cddfSDavid du Colombier<b><tt>currentfile</tt></b>.
23397dd7cddfSDavid du Colombier</dl>
23407dd7cddfSDavid du Colombier
23417dd7cddfSDavid du Colombier<dl>
23427dd7cddfSDavid du Colombier<dt><a name="dQUIET"></a><b><tt>-dQUIET</tt></b>
23437dd7cddfSDavid du Colombier<dd>Suppresses routine information comments on standard output.  This is
23447dd7cddfSDavid du Colombiercurrently necessary when redirecting device output to standard output.
23457dd7cddfSDavid du Colombier</dl>
23467dd7cddfSDavid du Colombier
23477dd7cddfSDavid du Colombier<dl>
23487dd7cddfSDavid du Colombier<dt><b><tt>-dSHORTERRORS</tt></b>
23497dd7cddfSDavid du Colombier<dd>Makes certain error and information messages more Adobe-compatible.
23507dd7cddfSDavid du Colombier</dl>
23517dd7cddfSDavid du Colombier
23527dd7cddfSDavid du Colombier<dl>
23533ff48bf5SDavid du Colombier<dt><b><tt>-sstdout=</tt></b><em>filename</em>
23543ff48bf5SDavid du Colombier<dd>Redirect PostScript <b><tt>%stdout</tt></b> to a file or
23553ff48bf5SDavid du Colombier<b><tt>stderr</tt></b>, to avoid it being mixed with device stdout.
23563ff48bf5SDavid du ColombierTo redirect stdout to stderr use <b><tt>-sstdout=%stderr</tt></b>.
23573ff48bf5SDavid du ColombierTo cancel redirection of stdout use <b><tt>-sstdout=%stdout</tt></b>
23583ff48bf5SDavid du Colombieror <b><tt>-sstdout=-</tt></b>.
23593ff48bf5SDavid du Colombier</dl>
23603ff48bf5SDavid du Colombier
23613ff48bf5SDavid du Colombier<dl>
23627dd7cddfSDavid du Colombier<dt><b><tt>-dTTYPAUSE</tt></b>
23637dd7cddfSDavid du Colombier<dd>Causes Ghostscript to read a character from <b><tt>/dev/tty</tt></b>,
23647dd7cddfSDavid du Colombierrather than standard input, at the end of each page.  This may be useful if
23657dd7cddfSDavid du Colombierinput is coming from a pipe.  Note that <b><tt>-dTTYPAUSE</tt></b>
23667dd7cddfSDavid du Colombieroverrides <b><tt>-dNOPAUSE</tt></b>.
23677dd7cddfSDavid du Colombier</dl>
23687dd7cddfSDavid du Colombier
23693ff48bf5SDavid du Colombier<h4><a name="Output_selection_parameters"></a>Device and output selection parameters</h4>
23707dd7cddfSDavid du Colombier
23717dd7cddfSDavid du Colombier<dl>
23727dd7cddfSDavid du Colombier<dt><b><tt>-dNODISPLAY</tt></b>
23737dd7cddfSDavid du Colombier<dd>Initializes Ghostscript with a null device (a device that discards the
23747dd7cddfSDavid du Colombieroutput image) rather than the default device or the device selected with
23757dd7cddfSDavid du Colombier<b><tt>-sDEVICE=</tt></b>.  This is usually useful only when running
23767dd7cddfSDavid du ColombierPostScript code whose purpose is to compute something rather than to
23777dd7cddfSDavid du Colombierproduce an output image; for instance, when converting PostScript to PDF.
23787dd7cddfSDavid du Colombier</dl>
23797dd7cddfSDavid du Colombier
23807dd7cddfSDavid du Colombier<dl>
23817dd7cddfSDavid du Colombier<dt><a name="DEVICE_switch"></a><b><tt>-sDEVICE=</tt></b><em>device</em>
23827dd7cddfSDavid du Colombier<dd>Selects an alternate <a href="#Output_device">initial output
23837dd7cddfSDavid du Colombierdevice</a>.
23847dd7cddfSDavid du Colombier</dl>
23857dd7cddfSDavid du Colombier
23867dd7cddfSDavid du Colombier<dl>
23877dd7cddfSDavid du Colombier<dt><b><tt>-sOutputFile=</tt></b><em>filename</em>
23887dd7cddfSDavid du Colombier<dd>Selects an alternate output file (or pipe) for the initial output
23897dd7cddfSDavid du Colombierdevice, as described above.
23907dd7cddfSDavid du Colombier</dl>
23917dd7cddfSDavid du Colombier
2392*593dc095SDavid du Colombier<h4><a name="EPS_parameters"></a>EPS parameters</h4>
2393*593dc095SDavid du Colombier
2394*593dc095SDavid du Colombier<dl>
2395*593dc095SDavid du Colombier<dt><b><tt>-dEPSCrop</tt></b>
2396*593dc095SDavid du Colombier<dd>Crop an EPS file to the bounding box.
2397*593dc095SDavid du ColombierThis is useful when converting an EPS file to a bitmap.
2398*593dc095SDavid du Colombier</dl>
2399*593dc095SDavid du Colombier
2400*593dc095SDavid du Colombier<dl>
2401*593dc095SDavid du Colombier<dt><b><tt>-dEPSFitPage</tt></b>
2402*593dc095SDavid du Colombier<dd>Resize an EPS file to fit the page.
2403*593dc095SDavid du ColombierThis is useful for enlarging an EPS file to fit the paper size when printing.
2404*593dc095SDavid du Colombier</dl>
2405*593dc095SDavid du Colombier
2406*593dc095SDavid du Colombier<dl>
2407*593dc095SDavid du Colombier<dt><b><tt>-dNOEPS</tt></b>
2408*593dc095SDavid du Colombier<dd>Prevent special processing of EPS files.
2409*593dc095SDavid du ColombierThis is useful when EPS files have incorrect Document
2410*593dc095SDavid du ColombierStructuring Convention comments.
2411*593dc095SDavid du Colombier</dl>
2412*593dc095SDavid du Colombier
24133ff48bf5SDavid du Colombier<h4><a name="Other_parameters"></a>Other parameters</h4>
24147dd7cddfSDavid du Colombier
24157dd7cddfSDavid du Colombier<dl>
24167dd7cddfSDavid du Colombier<dt><b><tt>-dDELAYBIND</tt></b>
24177dd7cddfSDavid du Colombier<dd>Causes <b><tt>bind</tt></b> to remember all its invocations, but not
24187dd7cddfSDavid du Colombieractually execute them until the <b><tt>.bindnow</tt></b> procedure is
24197dd7cddfSDavid du Colombiercalled.  Useful only for certain specialized packages like
2420*593dc095SDavid du Colombier<b><tt>pstotext</tt></b> that redefine operators. See the documentation
2421*593dc095SDavid du Colombierfor <a href="Language.htm#bindnow"><tt>.bindnow</tt></a> for more information
2422*593dc095SDavid du Colombieron using this feature.
24237dd7cddfSDavid du Colombier</dl>
24247dd7cddfSDavid du Colombier
24257dd7cddfSDavid du Colombier<dl>
24263ff48bf5SDavid du Colombier<dt><b><tt>-dDOPDFMARKS</tt></b>
24273ff48bf5SDavid du Colombier<dd>Causes <b><tt>pdfmark</tt></b> to be called for bookmarks,
24283ff48bf5SDavid du Colombierannotations, links and cropbox when processing PDF files.
24293ff48bf5SDavid du ColombierNormally, <b><tt>pdfmark</tt></b> is only called for these types
24303ff48bf5SDavid du Colombierfor PostScript files or when the output device requests it
24313ff48bf5SDavid du Colombier(e.g. pdfwrite device).
24323ff48bf5SDavid du Colombier</dl>
24333ff48bf5SDavid du Colombier
24343ff48bf5SDavid du Colombier<dl>
2435*593dc095SDavid du Colombier<dt><b><tt>-dJOBSERVER</tt></b>
2436*593dc095SDavid du Colombier<dd>Define <tt>\004 (^D)</tt> to start a new encapsulated job used for
2437*593dc095SDavid du Colombiercompatibility with Adobe PS Interpreters that ordinarily run under a job
2438*593dc095SDavid du Colombierserver. The <b><tt>-dNOOUTERSAVE</tt></b> switch is ignored if <b><tt>-dJOBSERVER</tt></b>
2439*593dc095SDavid du Colombieris specified since job servers <b>always</b> execute the input PostScript
2440*593dc095SDavid du Colombierunder a save level, although the <b><tt>exitserver</tt></b> operator can
2441*593dc095SDavid du Colombierbe used to escape from the encapsulated job and execute as if the
2442*593dc095SDavid du Colombier<b><tt>-dNOOUTERSAVE</tt></b> was specified.
2443*593dc095SDavid du Colombier<p>
2444*593dc095SDavid du ColombierThis also requires that the input be from stdin, otherwise an error will
2445*593dc095SDavid du Colombierresult (<tt>Error: /invalidrestore in --restore--</tt>).
2446*593dc095SDavid du Colombier<p>Example usage is:
2447*593dc095SDavid du Colombier<pre>
2448*593dc095SDavid du Colombier    gs ... -dJOBSERVER - < inputfile.ps
2449*593dc095SDavid du Colombier                     -or-
2450*593dc095SDavid du Colombier    cat inputfile.ps | gs ... -dJOBSERVER -
2451*593dc095SDavid du Colombier</pre>
2452*593dc095SDavid du Colombier<b>Note: </b>The <tt>^D</tt> does not result in an end-of-file action
2453*593dc095SDavid du Colombieron stdin as it may on some PostScript printers that rely on TBCP (Tagged
2454*593dc095SDavid du ColombierBinary Communication Protocol) to cause an out-of-band <tt>^D</tt> to
2455*593dc095SDavid du Colombiersignal EOF in a stream input data. This means that direct file actions
2456*593dc095SDavid du Colombieron stdin such as <b><tt>flushfile</tt></b> and <b><tt>closefile</tt></b>
2457*593dc095SDavid du Colombierwill affect processing of data beyond the <tt>^D</tt> in the stream.
2458*593dc095SDavid du Colombier</dl>
2459*593dc095SDavid du Colombier
2460*593dc095SDavid du Colombier<dl>
24617dd7cddfSDavid du Colombier<dt><b><tt>-dNOBIND</tt></b>
24627dd7cddfSDavid du Colombier<dd>Disables the <b><tt>bind</tt></b> operator.  Useful only for debugging.
24637dd7cddfSDavid du Colombier</dl>
24647dd7cddfSDavid du Colombier
24657dd7cddfSDavid du Colombier<dl>
24667dd7cddfSDavid du Colombier<dt><b><tt>-dNOCACHE</tt></b>
24677dd7cddfSDavid du Colombier<dd>Disables character caching.  Useful only for debugging.
24687dd7cddfSDavid du Colombier</dl>
24697dd7cddfSDavid du Colombier
24707dd7cddfSDavid du Colombier<dl>
24717dd7cddfSDavid du Colombier<dt><b><tt>-dNOGC</tt></b>
24727dd7cddfSDavid du Colombier<dd>Suppresses the initial automatic enabling of the garbage collector in
24737dd7cddfSDavid du ColombierLevel 2 systems.  (The <b><tt>vmreclaim</tt></b> operator is not disabled.)
24747dd7cddfSDavid du ColombierUseful only for debugging.
24757dd7cddfSDavid du Colombier</dl>
24767dd7cddfSDavid du Colombier
24777dd7cddfSDavid du Colombier<dl>
2478*593dc095SDavid du Colombier<dt><b><tt>-dNOOUTERSAVE</tt></b>
2479*593dc095SDavid du Colombier<dd>Suppresses the initial save that is used for compatibility with Adobe
2480*593dc095SDavid du ColombierPS Interpreters that ordinarily run under a job server. If a job server is
2481*593dc095SDavid du Colombiergoing to be used to set up the outermost save level, then <b><tt>-dNOOUTERSAVE</tt></b>
2482*593dc095SDavid du Colombiershould be used so that the restore between jobs will restore global VM as
2483*593dc095SDavid du Colombierexpected.
2484*593dc095SDavid du Colombier</dl>
2485*593dc095SDavid du Colombier
2486*593dc095SDavid du Colombier<dl>
24873ff48bf5SDavid du Colombier<dt><b><tt>-dNOSAFER</tt></b> (equivalent to <b><tt>-dDELAYSAFER</tt></b>).
24883ff48bf5SDavid du Colombier<dd>This flag disables SAFER mode until the <b><tt>.setsafe</tt></b>
24893ff48bf5SDavid du Colombierprocedure is run. This is intended for clients or scripts that cannot
24903ff48bf5SDavid du Colombieroperate in SAFER mode. If Ghostscript is started with <b><tt>-dNOSAFER</tt></b>
24913ff48bf5SDavid du Colombieror <b><tt>-dDELAYSAFER</tt></b>, PostScript programs are allowed to read, write,
24923ff48bf5SDavid du Colombierrename or delete any files in the system that are not protected by operating
24933ff48bf5SDavid du Colombiersystem permissions.
24943ff48bf5SDavid du Colombier<p><b>This mode should be used with caution, and <tt>.setsafe</tt> should be
24953ff48bf5SDavid du Colombierrun prior to running any PostScript file with unknown contents.</b>
24963ff48bf5SDavid du Colombier</dl>
24973ff48bf5SDavid du Colombier
24983ff48bf5SDavid du Colombier<a name="Safer"></a>
24993ff48bf5SDavid du Colombier<dl>
25003ff48bf5SDavid du Colombier<dt><b><tt>-dSAFER</tt></b>
25017dd7cddfSDavid du Colombier<dd>Disables the <b><tt>deletefile</tt></b> and <b><tt>renamefile</tt></b>
25023ff48bf5SDavid du Colombieroperators, and the ability to open piped commands (<b><tt>%pipe%</tt></b><em>cmd</em>)
25033ff48bf5SDavid du Colombierat all. Only <b><tt>%stdout</tt></b> and <b><tt>%stderr</tt></b> can be opened
2504*593dc095SDavid du Colombierfor writing.  Disables reading of files other than <b><tt>%stdin</tt></b>,
2505*593dc095SDavid du Colombierthose given as a command line argument, or those contained on one of the paths
2506*593dc095SDavid du Colombiergiven by LIBPATH and FONTPATH and specified by the system params /FontResourceDir
2507*593dc095SDavid du Colombierand /GenericResourceDir.
25083ff48bf5SDavid du Colombier<p>
25093ff48bf5SDavid du ColombierThis mode also sets the <a href="Language.htm#LockSafetyParams">.LockSafetyParams</a>
25103ff48bf5SDavid du Colombierparameter of the default device, or the device specified with the <b><tt>-sDEVICE= </tt></b>
25113ff48bf5SDavid du Colombierswitch to protect against programs that attempt to write to files using the
25123ff48bf5SDavid du ColombierOutputFile device parameter. Note that since the device parameters specified
25133ff48bf5SDavid du Colombieron the command line (including OutputFile) are set prior to SAFER mode,
25143ff48bf5SDavid du Colombierthe <b><tt>-sOutputFile=...</tt></b> on the command line is unrestricted.
25153ff48bf5SDavid du Colombier<p>
2516*593dc095SDavid du ColombierSAFER mode also prevents changing the /GenericResourceDir, /FontResourceDir
2517*593dc095SDavid du Colombierand either the /SystemParamsPassword or the /StartJobPassword.
25183ff48bf5SDavid du Colombier<p>
25193ff48bf5SDavid du Colombier<b>Note: </b>While SAFER mode is not the default, in a subsequent release of
25203ff48bf5SDavid du ColombierGhostscript, SAFER mode will be the default thus scripts or programs that need
25213ff48bf5SDavid du Colombierto open files or set restricted parameters will require the <b><tt>-dNOSAFER</tt></b>
25223ff48bf5SDavid du Colombiercommand line option.
25233ff48bf5SDavid du Colombier<p>
25243ff48bf5SDavid du ColombierWhen running -dNOSAFER it is possible to perform a <b><tt>save</tt></b>,
25253ff48bf5SDavid du Colombierfollowed by <b><tt>.setsafe</tt></b>, execute a file or procedure in SAFER mode,
25263ff48bf5SDavid du Colombierthen use <b><tt>restore</tt></b> to return to NOSAFER mode. In order to prevent
25273ff48bf5SDavid du Colombierthe save object from being restored by the foreign file or procedure, the
25283ff48bf5SDavid du Colombier<a href="Language.htm#Runandhide"><b>.runandhide</b></a> operator should
25293ff48bf5SDavid du Colombierbe used to hide the save object from the restricted procedure.
25303ff48bf5SDavid du Colombier</dl>
25313ff48bf5SDavid du Colombier
25323ff48bf5SDavid du Colombier<dl>
25337dd7cddfSDavid du Colombier<dt><b><tt>-dSTRICT</tt></b>
25347dd7cddfSDavid du Colombier<dd>Disables as many Ghostscript extensions as feasible, to be more helpful
25357dd7cddfSDavid du Colombierin debugging applications that produce output for Adobe and other RIPs.
25367dd7cddfSDavid du Colombier</dl>
25377dd7cddfSDavid du Colombier
25387dd7cddfSDavid du Colombier<dl>
25397dd7cddfSDavid du Colombier<dt><b><tt>-dWRITESYSTEMDICT</tt></b>
25407dd7cddfSDavid du Colombier<dd>Leaves <b><tt>systemdict</tt></b> writable.  This is necessary when
25417dd7cddfSDavid du Colombierrunning special utility programs such as <b><tt>font2c</tt></b> and
25427dd7cddfSDavid du Colombier<b><tt>pcharstr</tt></b>, which must bypass normal PostScript access
25437dd7cddfSDavid du Colombierprotection.
25447dd7cddfSDavid du Colombier</dl>
25457dd7cddfSDavid du Colombier
25467dd7cddfSDavid du Colombier<hr>
25477dd7cddfSDavid du Colombier
25483ff48bf5SDavid du Colombier<h2><a name="Improving_performance"></a>Improving performance</h2>
25497dd7cddfSDavid du Colombier
25507dd7cddfSDavid du Colombier<p>
25517dd7cddfSDavid du ColombierGhostscript attempts to find an optimum balance between speed and memory
25527dd7cddfSDavid du Colombierconsumption, but there are some cases in which you may get a very large
25537dd7cddfSDavid du Colombierspeedup by telling Ghostscript to use more memory.
25547dd7cddfSDavid du Colombier
25557dd7cddfSDavid du Colombier<ul>
25567dd7cddfSDavid du Colombier
25577dd7cddfSDavid du Colombier<li>
25587dd7cddfSDavid du ColombierIf you are using X Windows, setting the <b><tt>-dMaxBitmap=</tt></b>
25597dd7cddfSDavid du Colombierparameter described <a href="#X_device_parameters">above</a> may
25607dd7cddfSDavid du Colombierdramatically improve performance on files that have a lot of bitmap images.
25617dd7cddfSDavid du Colombier
25627dd7cddfSDavid du Colombier<li>
25637dd7cddfSDavid du ColombierIf you are using Chinese, Japanese, or other fonts with very large character
25647dd7cddfSDavid du Colombiersets, adding the following sequence of switches before the first file name
25657dd7cddfSDavid du Colombiermay dramatically improve performance at the cost of an additional 2-3 Mb of
2566*593dc095SDavid du Colombiermemory: <b><tt>-c&nbsp;3000000&nbsp;setvmthreshold&nbsp;-f</tt></b>. This
2567*593dc095SDavid du Colombiercan also be useful in processing large documents when using a high-level
2568*593dc095SDavid du Colombieroutput device (like pdfwrite) that maintains significant internal state.
2569*593dc095SDavid du ColombierIn fact, the <a href="Language.htm#.setpdfwrite"><tt>.setpdfwrite</tt></a>
2570*593dc095SDavid du Colombieroperator used by the ps2pdf script and others sets a vmthreshold value of
2571*593dc095SDavid du Colombier3&nbsp;MB to account for this.
25727dd7cddfSDavid du Colombier
25737dd7cddfSDavid du Colombier</ul>
25747dd7cddfSDavid du Colombier
2575*593dc095SDavid du Colombier<h2><a name="Environment_variables"></a>Summary of environment variables</h2>
2576*593dc095SDavid du Colombier
2577*593dc095SDavid du Colombier<dl>
2578*593dc095SDavid du Colombier<dt><b><tt>GS</tt></b>, <b><tt>GSC</tt></b> (MS Windows only)
2579*593dc095SDavid du Colombier<dd>Specify the names of the Ghostscript executables.  <b><tt>GS</tt></b>
2580*593dc095SDavid du Colombierbrings up a new typein window and possibly a graphics window;
2581*593dc095SDavid du Colombier<b><tt>GSC</tt></b> uses the DOS console.  If these are not set,
2582*593dc095SDavid du Colombier<b><tt>GS</tt></b> defaults to <b><tt>gswin32</tt></b>, and
2583*593dc095SDavid du Colombier<b><tt>GSC</tt></b> defaults to <b><tt>gswin32c</tt></b>.
2584*593dc095SDavid du Colombier</dl>
2585*593dc095SDavid du Colombier
2586*593dc095SDavid du Colombier<dl>
2587*593dc095SDavid du Colombier<dt><a href="#GS_DEVICE"><b><tt>GS_DEVICE</tt></b></a>
2588*593dc095SDavid du Colombier<dd>Defines the default output device. This overrides the compiled-in default, but is overridden by any commandline setting.
2589*593dc095SDavid du Colombier</dl>
2590*593dc095SDavid du Colombier
2591*593dc095SDavid du Colombier<dl>
2592*593dc095SDavid du Colombier<dt><a href="#Font_lookup"><b><tt>GS_FONTPATH</tt></b></a>
2593*593dc095SDavid du Colombier<dd>Specifies a list of directories to scan for fonts if a font requested
2594*593dc095SDavid du Colombiercan't be found anywhere on the search path.
2595*593dc095SDavid du Colombier</dl>
2596*593dc095SDavid du Colombier
2597*593dc095SDavid du Colombier<dl>
2598*593dc095SDavid du Colombier<dt><a href="#Finding_files"><b><tt>GS_LIB</tt></b></a>
2599*593dc095SDavid du Colombier<dd>Provides a search path for initialization files and fonts.
2600*593dc095SDavid du Colombier</dl>
2601*593dc095SDavid du Colombier
2602*593dc095SDavid du Colombier<dl>
2603*593dc095SDavid du Colombier<dt><b><tt>GS_OPTIONS</tt></b>
2604*593dc095SDavid du Colombier<dd>Defines a list of command-line arguments to be processed before the
2605*593dc095SDavid du Colombierones actually specified on the command line.  For example, setting
2606*593dc095SDavid du Colombier<b><tt>GS_DEVICE</tt></b> to XYZ is equivalent to setting
2607*593dc095SDavid du Colombier<b><tt>GS_OPTIONS</tt></b> to <b><tt>-sDEVICE=XYZ</tt></b>.  The contents
2608*593dc095SDavid du Colombierof <b><tt>GS_OPTIONS</tt></b> are not limited to switches; they may include
2609*593dc095SDavid du Colombieractual file names or even <a href="#Input_control">"@file" arguments</a>.
2610*593dc095SDavid du Colombier
2611*593dc095SDavid du Colombier</dl>
2612*593dc095SDavid du Colombier
2613*593dc095SDavid du Colombier<dl>
2614*593dc095SDavid du Colombier<dt><a href="#Temp_files"><b><tt>TEMP</tt></b>, <b><tt>TMPDIR</tt></b></a>
2615*593dc095SDavid du Colombier<dd>Defines a directory name for temporary files.  If both
2616*593dc095SDavid du Colombier<b><tt>TEMP</tt></b> and <b><tt>TMPDIR</tt></b> are defined,
2617*593dc095SDavid du Colombier<b><tt>TMPDIR</tt></b> takes precedence.
2618*593dc095SDavid du Colombier</dl>
2619*593dc095SDavid du Colombier
26207dd7cddfSDavid du Colombier<hr>
26217dd7cddfSDavid du Colombier
26223ff48bf5SDavid du Colombier<h2><a name="Debugging"></a>Debugging</h2>
26237dd7cddfSDavid du Colombier
26247dd7cddfSDavid du Colombier<p>
2625*593dc095SDavid du ColombierThe information here describing is probably interesting only to developers.
2626*593dc095SDavid du Colombier
2627*593dc095SDavid du Colombier<h4><a name="Debug_switches"></a>Debug switches</h4>
2628*593dc095SDavid du Colombier
2629*593dc095SDavid du ColombierThere are several debugging switches that are detected by the interpreter.
2630*593dc095SDavid du ColombierThese switches are available whether or not Ghostscript was built with the
2631*593dc095SDavid du ColombierDEBUG macro defined to the compiler (refer to <a href="Make.htm#Debugging">
2632*593dc095SDavid du Colombierbuilding a debugging configuration</a>).
2633*593dc095SDavid du Colombier
2634*593dc095SDavid du Colombier<p>Previous to 8.10, there was a single DEBUG flag, enabled with <b><tt>-dDEBUG
2635*593dc095SDavid du Colombier</tt></b> on the command line. Now there are several debugging flags to allow
2636*593dc095SDavid du Colombiermore selective debugging information to be printed containing only what is
2637*593dc095SDavid du Colombierneeded to investigate particular areas. For backward compatibilty, the
2638*593dc095SDavid du Colombier<b><tt>-dDEBUG</tt></b> option will set all of the subset switches.
2639*593dc095SDavid du Colombier
2640*593dc095SDavid du Colombier<ul>
2641*593dc095SDavid du Colombier<table cellpadding=0 cellspacing=0>
2642*593dc095SDavid du Colombier  <tr><td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td>&nbsp;
2643*593dc095SDavid du Colombier  <tr><td><b><tt>-dCCFONTDEBUG</tt></b><td><td>Compiled Fonts
2644*593dc095SDavid du Colombier  <tr><td><b><tt>-dCFFDEBUG</tt></b><td><td>CFF Fonts
2645*593dc095SDavid du Colombier  <tr><td><b><tt>-dCMAPDEBUG</tt></b><td><td>CMAP
2646*593dc095SDavid du Colombier  <tr><td><b><tt>-dDOCIEDEBUG</tt></b><td><td>CIE color
2647*593dc095SDavid du Colombier  <tr><td><b><tt>-dEPSDEBUG</tt></b><td><td>EPS handling
2648*593dc095SDavid du Colombier  <tr><td><b><tt>-dFAPIDEBUG</tt></b><td><td>Font API
2649*593dc095SDavid du Colombier  <tr><td><b><tt>-dINITDEBUG</tt></b><td><td>Initialization
2650*593dc095SDavid du Colombier  <tr><td><b><tt>-dPDFDEBUG</tt></b><td><td>PDF Interpreter
2651*593dc095SDavid du Colombier  <tr><td><b><tt>-dPDFOPTDEBUG</tt></b><td><td>PDF Optimizer (Linearizer)
2652*593dc095SDavid du Colombier  <tr><td><b><tt>-dPDFWRDEBUG</tt></b><td><td>PDF Writer
2653*593dc095SDavid du Colombier  <tr><td><b><tt>-dSETPDDEBUG</tt></b><td><td>setpagedevice
2654*593dc095SDavid du Colombier  <tr><td><b><tt>-dSTRESDEBUG</tt></b><td><td>Static Resources
2655*593dc095SDavid du Colombier  <tr><td><b><tt>-dTTFDEBUG</tt></b><td><td>TTF Fonts
2656*593dc095SDavid du Colombier  <tr><td><b><tt>-dVGIFDEBUG</tt></b><td><td>ViewGIF
2657*593dc095SDavid du Colombier  <tr><td><b><tt>-dVJPGDEBUG</tt></b><td><td>ViewJPEG
2658*593dc095SDavid du Colombier</table></ul>
2659*593dc095SDavid du Colombier
2660*593dc095SDavid du Colombier<p><p>
2661*593dc095SDavid du ColombierThe <b><tt>-Z</tt></b> and <b><tt>-T</tt></b> switches apply only
26627dd7cddfSDavid du Colombierif the interpreter was <a href="Make.htm#Debugging">built for a debugging
26637dd7cddfSDavid du Colombierconfiguration</a>.  In the table below, the first column is a debugging
26647dd7cddfSDavid du Colombierswitch, the second is an equivalent switch (if any) and the third is its
26657dd7cddfSDavid du Colombierusage.
26667dd7cddfSDavid du Colombier
26677dd7cddfSDavid du Colombier<table cellpadding=0 cellspacing=0>
26687dd7cddfSDavid du Colombier<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Switches used in debugging</font><hr>
26697dd7cddfSDavid du Colombier<tr>    <th align=left>Switch
26707dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;
26717dd7cddfSDavid du Colombier        <th align=left>Equivalent
26727dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;
26737dd7cddfSDavid du Colombier        <th>&nbsp;
26747dd7cddfSDavid du Colombier<tr>    <td colspan=5><hr>
26757dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-A</tt></b>
26767dd7cddfSDavid du Colombier        <td>&nbsp;
26777dd7cddfSDavid du Colombier        <td valign=top><b><tt>-Z@</tt></b>
26787dd7cddfSDavid du Colombier        <td>&nbsp;
26797dd7cddfSDavid du Colombier        <td>Fill empty storage with a distinctive bit pattern for debugging
26807dd7cddfSDavid du Colombier
26817dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-A-</tt></b>
26827dd7cddfSDavid du Colombier        <td>&nbsp;
26837dd7cddfSDavid du Colombier        <td valign=top><b><tt>-Z-@</tt></b>
26847dd7cddfSDavid du Colombier        <td>&nbsp;
26857dd7cddfSDavid du Colombier        <td>Turn off <b><tt>-A</tt></b>
26867dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-B</tt></b><em>size</em>
26877dd7cddfSDavid du Colombier        <td>&nbsp;
26887dd7cddfSDavid du Colombier        <td>&nbsp;
26897dd7cddfSDavid du Colombier        <td>&nbsp;
26907dd7cddfSDavid du Colombier        <td>Run all subsequent files named on the command line (except for
26917dd7cddfSDavid du Colombier            <b><tt>-F</tt></b>) through the run_string interface, using a
26927dd7cddfSDavid du Colombier            buffer of <em>size</em> bytes
26937dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-B-</tt></b>
26947dd7cddfSDavid du Colombier        <td>&nbsp;
26957dd7cddfSDavid du Colombier        <td>&nbsp;
26967dd7cddfSDavid du Colombier        <td>&nbsp;
26977dd7cddfSDavid du Colombier        <td>Turn off <b><tt>-B</tt></b>: run subsequent files (except for
26987dd7cddfSDavid du Colombier            <b><tt>-F</tt></b>) directly in the normal way
26997dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-E</tt></b>
27007dd7cddfSDavid du Colombier        <td>&nbsp;
27017dd7cddfSDavid du Colombier        <td valign=top><b><tt>-Z#</tt></b>
27027dd7cddfSDavid du Colombier        <td>&nbsp;
27037dd7cddfSDavid du Colombier        <td>Turn on tracing of error returns from operators
27047dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-E-</tt></b>
27057dd7cddfSDavid du Colombier        <td>&nbsp;
27067dd7cddfSDavid du Colombier        <td valign=top><b><tt>-Z-#</tt></b>
27077dd7cddfSDavid du Colombier        <td>&nbsp;
27087dd7cddfSDavid du Colombier        <td>Turn off <b><tt>-E</tt></b>
27097dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-F</tt></b><em>file</em>
27107dd7cddfSDavid du Colombier        <td>&nbsp;
27117dd7cddfSDavid du Colombier        <td>&nbsp;
27127dd7cddfSDavid du Colombier        <td>&nbsp;
27137dd7cddfSDavid du Colombier        <td>Execute the file with <b><tt>-B1</tt></b> temporarily in effect
27143ff48bf5SDavid du Colombier<tr>    <td valign=top><b><tt>-K</tt></b><em>n</em>
27153ff48bf5SDavid du Colombier        <td>&nbsp;
27163ff48bf5SDavid du Colombier        <td>&nbsp;
27173ff48bf5SDavid du Colombier        <td>&nbsp;
27183ff48bf5SDavid du Colombier        <td>Limit the total amount of memory that the interpreter can have
27193ff48bf5SDavid du Colombier            allocated at any one time to <b><em>n</em></b>K bytes.
27203ff48bf5SDavid du Colombier            <b><em>n</em></b> is a positive decimal integer.
27217dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-M</tt></b><em>n</em>
27227dd7cddfSDavid du Colombier        <td>&nbsp;
27237dd7cddfSDavid du Colombier        <td>&nbsp;
27247dd7cddfSDavid du Colombier        <td>&nbsp;
27257dd7cddfSDavid du Colombier        <td>Force the interpreter's allocator to acquire additional memory
27267dd7cddfSDavid du Colombier            in units of <b><em>n</em></b>K bytes, rather than the default
27277dd7cddfSDavid du Colombier            (currently 20K on DOS systems, 50K on Unix). <b><em>n</em></b>
27287dd7cddfSDavid du Colombier            is a positive decimal integer, on DOS systems no greater than
27297dd7cddfSDavid du Colombier            63.
27307dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-N</tt></b><em>n</em>
27317dd7cddfSDavid du Colombier        <td>&nbsp;
27327dd7cddfSDavid du Colombier        <td>&nbsp;
27337dd7cddfSDavid du Colombier        <td>&nbsp;
27347dd7cddfSDavid du Colombier        <td>Allocate space for <b><em>n</em></b>K names, rather than the
27357dd7cddfSDavid du Colombier            default (normally 64K).  <b><em>n</em></b> may be greater than
27367dd7cddfSDavid du Colombier            64 only if <b><tt>EXTEND_NAMES</tt></b> was defined when the
27377dd7cddfSDavid du Colombier            interpreter was compiled .
27387dd7cddfSDavid du Colombier<tr>    <td valign=top><b><tt>-Z</tt></b><em>xxx</em><br><b><tt>-Z-</tt></b><em>xxx</em>
27397dd7cddfSDavid du Colombier        <td>&nbsp;
27407dd7cddfSDavid du Colombier        <td>&nbsp;
27417dd7cddfSDavid du Colombier        <td>&nbsp;
27427dd7cddfSDavid du Colombier        <td>Turn debugging printout on (off). Each of the <em>xxx</em>
27437dd7cddfSDavid du Colombier            characters selects an option.  Case is significant: "a" and
27447dd7cddfSDavid du Colombier            "A" have different meanings.
27457dd7cddfSDavid du Colombier
27467dd7cddfSDavid du Colombier<dl compact>
27477dd7cddfSDavid du Colombier<dt><b><tt>0</tt></b><dd>garbage collector, minimal detail
27487dd7cddfSDavid du Colombier<dt><b><tt>1</tt></b><dd>type 1 and type 42 font interpreter
27497dd7cddfSDavid du Colombier<dt><b><tt>2</tt></b><dd>curve subdivider/rasterizer
27507dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>3</tt></b><dd>curve subdivider/rasterizer, detail
27517dd7cddfSDavid du Colombier<dt><b><tt>4</tt></b><dd>garbage collector (strings)
27527dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>5</tt></b><dd>garbage collector (strings, detail)
27537dd7cddfSDavid du Colombier<dt><b><tt>6</tt></b><dd>garbage collector (chunks, roots)
27547dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>7</tt></b><dd>garbage collector (objects)
27557dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>8</tt></b><dd>garbage collector (refs)
27567dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>9</tt></b><dd>garbage collector (pointers)
27577dd7cddfSDavid du Colombier<dt><b><tt>a</tt></b><dd>allocator (large blocks only)
27587dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>A</tt></b><dd>allocator (all calls)
27597dd7cddfSDavid du Colombier<dt><b><tt>b</tt></b><dd>bitmap image processor
27607dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>B</tt></b><dd>bitmap images, detail
27617dd7cddfSDavid du Colombier<dt><b><tt>c</tt></b><dd>color/halftone mapper
27627dd7cddfSDavid du Colombier<dt><b><tt>d</tt></b><dd>dictionary put/undef
27637dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>D</tt></b><dd>dictionary lookups
27647dd7cddfSDavid du Colombier<dt><b><tt>e</tt></b><dd>external (OS-related) calls
27657dd7cddfSDavid du Colombier<dt><b><tt>f</tt></b><dd>fill algorithm (summary)
27667dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>F</tt></b><dd>fill algorithm (detail)
27677dd7cddfSDavid du Colombier<dt><b><tt>g</tt></b><dd>gsave/grestore[all]
27687dd7cddfSDavid du Colombier<dt><b><tt>h</tt></b><dd>halftone renderer
27697dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>H</tt></b><dd>halftones, every pixel
27707dd7cddfSDavid du Colombier<dt><b><tt>i</tt></b><dd>interpreter, just names
27717dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>I</tt></b><dd>interpreter, everything
27727dd7cddfSDavid du Colombier<dt><b><tt>j</tt></b><dd>(Japanese) composite fonts
27737dd7cddfSDavid du Colombier<dt><b><tt>k</tt></b><dd>character cache and xfonts
27747dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>K</tt></b><dd>character cache, every access
27757dd7cddfSDavid du Colombier<dt><b><tt>l</tt></b><dd>command lists, bands
27767dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>L</tt></b><dd>command lists, everything
27777dd7cddfSDavid du Colombier<dt><b><tt>m</tt></b><dd>makefont and font cache
27787dd7cddfSDavid du Colombier<dt><b><tt>n</tt></b><dd>name lookup (new names only)
27797dd7cddfSDavid du Colombier<dt><b><tt>o</tt></b><dd>outliner (stroke)
27807dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>O</tt></b><dd>stroke detail
27817dd7cddfSDavid du Colombier<dt><b><tt>p</tt></b><dd>band list paths
27827dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>P</tt></b><dd>all paths
27837dd7cddfSDavid du Colombier<dt><b><tt>q</tt></b><dd>clipping
27847dd7cddfSDavid du Colombier<dt><b><tt>r</tt></b><dd>arc renderer
27857dd7cddfSDavid du Colombier<dt><b><tt>s</tt></b><dd>streams
27867dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>S</tt></b><dd>scanner
27877dd7cddfSDavid du Colombier<dt><b><tt>t</tt></b><dd>tiling algorithm
27887dd7cddfSDavid du Colombier<dt><b><tt>u</tt></b><dd>undo saver (for save/restore), finalization
27897dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>U</tt></b><dd>undo saver, more detail
27903ff48bf5SDavid du Colombier<dt><b><tt>v</tt></b><dd>alpha/transparency
27913ff48bf5SDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>V</tt></b><dd>alpha/transparency, more detail
27927dd7cddfSDavid du Colombier<dt><b><tt>w</tt></b><dd>compression encoder/decoder
27937dd7cddfSDavid du Colombier<dt><b><tt>x</tt></b><dd>transformations
27947dd7cddfSDavid du Colombier<dt><b><tt>y</tt></b><dd>Type 1 hints
27957dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>Y</tt></b><dd>Type 1 hints, every access
27967dd7cddfSDavid du Colombier<dt><b><tt>z</tt></b><dd>trapezoid fill
27977dd7cddfSDavid du Colombier<dt><b><tt>#</tt></b><dd>operator error returns
27987dd7cddfSDavid du Colombier<dt><b><tt>%</tt></b><dd>externally processed comments
27997dd7cddfSDavid du Colombier<dt><b><tt>*</tt></b><dd>image and RasterOp parameters
28007dd7cddfSDavid du Colombier<dt><b><tt>:</tt></b><dd>command list and allocator/time summary
28017dd7cddfSDavid du Colombier<dt><b><tt>~</tt></b><dd>math functions and Functions
28027dd7cddfSDavid du Colombier<dt><b><tt>'</tt></b><dd>contexts, create/destroy
28037dd7cddfSDavid du Colombier<dt>&nbsp;&nbsp;&nbsp;<b><tt>"</tt></b><dd>contexts, every operation
28047dd7cddfSDavid du Colombier<dt><b><tt>^</tt></b><dd>reference counting
28057dd7cddfSDavid du Colombier<dt><b><tt>_</tt></b><dd>high-level output
28067dd7cddfSDavid du Colombier<dt><b><tt>|</tt></b><dd>(reserved for experimental code)
28077dd7cddfSDavid du Colombier</dl>
28087dd7cddfSDavid du Colombier
28097dd7cddfSDavid du Colombier<p>
28107dd7cddfSDavid du ColombierThe following switch affects what is printed, but does not select specific
28117dd7cddfSDavid du Colombieritems for printing:
28127dd7cddfSDavid du Colombier
28137dd7cddfSDavid du Colombier<dl compact>
28147dd7cddfSDavid du Colombier<dt><b><tt>/</tt></b><dd>include file name and line number on all trace output
28157dd7cddfSDavid du Colombier</dl>
28167dd7cddfSDavid du Colombier
28177dd7cddfSDavid du Colombier<p>
28187dd7cddfSDavid du ColombierThese switches select debugging options other than what should be printed:
28197dd7cddfSDavid du Colombier
28207dd7cddfSDavid du Colombier<dl compact>
28217dd7cddfSDavid du Colombier<dt><b><tt>$</tt></b><dd>set unused parts of object references to
28227dd7cddfSDavid du Colombieridentifiable garbage values
28237dd7cddfSDavid du Colombier<dt><b><tt>+</tt></b><dd>use minimum-size stack blocks
28247dd7cddfSDavid du Colombier<dt><b><tt>,</tt></b><dd>don't use path-based banding
28257dd7cddfSDavid du Colombier<dt><b><tt>`</tt></b><dd>don't use high-level banded images
28267dd7cddfSDavid du Colombier<dt><b><tt>.</tt></b><dd>use small-memory table sizes even on large-memory
28277dd7cddfSDavid du Colombiermachines
28287dd7cddfSDavid du Colombier<dt><b><tt>?</tt></b><dd>validate pointers before, during and after garbage
28297dd7cddfSDavid du Colombiercollection, also before and after save and restore; also make other
28307dd7cddfSDavid du Colombierallocator validity checks
28317dd7cddfSDavid du Colombier<dt><b><tt>@</tt></b><dd>fill newly allocated, garbage-collected, and freed
28327dd7cddfSDavid du Colombierstorage with a marker (a1, c1, and f1 respectively)
28337dd7cddfSDavid du Colombier</dl>
2834*593dc095SDavid du Colombier
2835*593dc095SDavid du Colombier<p>
2836*593dc095SDavid du Colombier<tr>    <td valign=top><b><tt>-T</tt></b><em>xxx</em><br><b><tt>-T-</tt></b><em>xxx</em>
2837*593dc095SDavid du Colombier        <td>&nbsp;
2838*593dc095SDavid du Colombier        <td>&nbsp;
2839*593dc095SDavid du Colombier        <td>&nbsp;
2840*593dc095SDavid du Colombier        <td>Turn <a href="#Visual_trace">Visual Trace</a> on (off). Each of the <em>xxx</em>
2841*593dc095SDavid du Colombier            characters selects an option.  Case is significant: "f" and
2842*593dc095SDavid du Colombier            "F" have different meanings.
2843*593dc095SDavid du Colombier
2844*593dc095SDavid du Colombier<dl compact>
2845*593dc095SDavid du Colombier<dt><b><tt>f</tt></b><dd>the filling algorithm with characters
2846*593dc095SDavid du Colombier<dt><b><tt>F</tt></b><dd>the filling algorithm with non-character paths
2847*593dc095SDavid du Colombier<dt><b><tt>h</tt></b><dd>the Type 1 hinter
2848*593dc095SDavid du Colombier<dt><b><tt>s</tt></b><dd>the shading algorithm
2849*593dc095SDavid du Colombier<dt><b><tt>S</tt></b><dd>the stroking algorithm
2850*593dc095SDavid du Colombier</dl>
28517dd7cddfSDavid du Colombier</table>
28527dd7cddfSDavid du Colombier
2853*593dc095SDavid du Colombier<h4><a name="Visual_trace"></a>Visual Trace</h4>
2854*593dc095SDavid du Colombier
2855*593dc095SDavid du Colombier<p>
2856*593dc095SDavid du ColombierVisual Trace allows to view internal Ghostscript data in a graphical form
2857*593dc095SDavid du Colombierwhile execution of C code.  Special
2858*593dc095SDavid du Colombier<a href="Lib.htm#Visual_trace">instructions</a> to be inserted into
2859*593dc095SDavid du ColombierC code for generating the output. Client application
2860*593dc095SDavid du Colombierrasterizes it into a window.
2861*593dc095SDavid du Colombier
2862*593dc095SDavid du Colombier<p>
2863*593dc095SDavid du ColombierCurrently the rasterization is implemented for Windows only, in clients
2864*593dc095SDavid du Colombiergswin32.exe and gswin32c.exe. They open Visual Trace window when graphical
2865*593dc095SDavid du Colombierdebug output appears, <b><tt>-T</tt></b> <a href="#Debug_switches">switch</a> is set,
2866*593dc095SDavid du Colombierand Ghostscript was <a href="Make.htm#Debugging">built</a> with DEBUG option.
2867*593dc095SDavid du ColombierThere are two important incompletenesses of the implementation :
2868*593dc095SDavid du Colombier
2869*593dc095SDavid du Colombier<p>
2870*593dc095SDavid du Colombier1. The graphical output uses a hardcoded scale. An advanced client
2871*593dc095SDavid du Colombierwould provide a scale option via user interface.
2872*593dc095SDavid du Colombier
2873*593dc095SDavid du Colombier<p>
2874*593dc095SDavid du Colombier2. Breaks are not implemented in the client. If you need a step-by-step
2875*593dc095SDavid du Colombierview, you should use an interactive C debugger to delay execution at breakpoints.
2876*593dc095SDavid du Colombier
2877*593dc095SDavid du Colombier<p>
28787dd7cddfSDavid du Colombier<hr>
28797dd7cddfSDavid du Colombier
28803ff48bf5SDavid du Colombier<h2><a name="Known_paper_sizes"></a>Appendix: Paper sizes known to Ghostscript</h2>
28817dd7cddfSDavid du Colombier
28827dd7cddfSDavid du Colombier<p>
28837dd7cddfSDavid du ColombierThe paper sizes known to Ghostscript are defined at the beginning of the
28847dd7cddfSDavid du Colombierinitialization file <b><tt>gs_statd.ps</tt></b>; see the comments there for
28857dd7cddfSDavid du Colombiermore details about the definitions. The table here lists them by name and
28867dd7cddfSDavid du Colombiersize.  <b><tt>gs_statd.ps</tt></b> defines their sizes exactly in points,
28877dd7cddfSDavid du Colombierand the dimensions in inches (at 72 points per inch) and centimeters shown
28887dd7cddfSDavid du Colombierin the table are derived from those, rounded to the nearest 0.1 unit.  A
28897dd7cddfSDavid du Colombierguide to international paper sizes can be found at
28907dd7cddfSDavid du Colombier
28917dd7cddfSDavid du Colombier<blockquote>
2892*593dc095SDavid du Colombier<a href="http://www.twics.com/~eds/paper/index.html">http://www.twics.com/~eds/paper/</a>
28937dd7cddfSDavid du Colombier</blockquote>
28947dd7cddfSDavid du Colombier
28957dd7cddfSDavid du Colombier<table cellpadding=0 cellspacing=0>
28967dd7cddfSDavid du Colombier<tr><th colspan=13 bgcolor="#CCCC00"><hr><font size="+1">Paper sizes known to Ghostscript</font><hr>
28977dd7cddfSDavid du Colombier<tr><th colspan=13>U.S. standard
28987dd7cddfSDavid du Colombier<tr>    <td>&nbsp;
28997dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
29007dd7cddfSDavid du Colombier        <th colspan=3>Inches
29017dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2902*593dc095SDavid du Colombier        <th colspan=3>mm
29037dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
29047dd7cddfSDavid du Colombier        <th colspan=3>Points
29057dd7cddfSDavid du Colombier        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
29067dd7cddfSDavid du Colombier        <td>&nbsp;
29077dd7cddfSDavid du Colombier<tr>    <th align=left>Name
29087dd7cddfSDavid du Colombier        <td>&nbsp;
29097dd7cddfSDavid du Colombier        <th>&nbsp;W&nbsp;
29107dd7cddfSDavid du Colombier        <td>&times;
29117dd7cddfSDavid du Colombier        <th>&nbsp;H&nbsp;
29127dd7cddfSDavid du Colombier        <td>&nbsp;
29137dd7cddfSDavid du Colombier        <th>&nbsp;W&nbsp;
29147dd7cddfSDavid du Colombier        <td>&times;
29157dd7cddfSDavid du Colombier        <th>&nbsp;H&nbsp;
29167dd7cddfSDavid du Colombier        <td>&nbsp;
29177dd7cddfSDavid du Colombier        <th>&nbsp;W&nbsp;
29187dd7cddfSDavid du Colombier        <td>&times;
29197dd7cddfSDavid du Colombier        <th>&nbsp;H&nbsp;
29207dd7cddfSDavid du Colombier        <td>&nbsp;
29217dd7cddfSDavid du Colombier        <td>&nbsp;
29227dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
29237dd7cddfSDavid du Colombier<tr>    <td>11x17
2924*593dc095SDavid du Colombier        <td>&nbsp;&nbsp;<td align=right>11.0<td>&nbsp;&nbsp;<td align=right>17.0<td>&nbsp;&nbsp;<td align=right>279<td>&nbsp;&nbsp;<td align=right>432<td>&nbsp;&nbsp;<td align=right>792<td>&nbsp;&nbsp;<td align=right>1224<td>&nbsp;&nbsp;<td>11&times;17in portrait
29257dd7cddfSDavid du Colombier<tr>    <td>ledger
2926*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>17.0<td>&nbsp;<td align=right>11.0<td>&nbsp;<td align=right>432<td>&nbsp;<td align=right>279<td>&nbsp;<td align=right>1224<td>&nbsp;<td align=right>792<td>&nbsp;<td>11&times;17in landscape
29277dd7cddfSDavid du Colombier<tr>    <td>legal
2928*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>14.0<td>&nbsp;<td align=right>216<td>&nbsp;<td align=right>356<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>1008<td>&nbsp;<td>&nbsp;
29297dd7cddfSDavid du Colombier<tr>    <td>letter
2930*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>11.0<td>&nbsp;<td align=right>216<td>&nbsp;<td align=right>279<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>792<td>&nbsp;<td>&nbsp;
29317dd7cddfSDavid du Colombier<tr>    <td>lettersmall
2932*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>11.0<td>&nbsp;<td align=right>216<td>&nbsp;<td align=right>279<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>792<td>&nbsp;<td>&nbsp;
29337dd7cddfSDavid du Colombier<tr>    <td>archE
2934*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>36.0<td>&nbsp;<td align=right>48.0<td>&nbsp;<td align=right>914<td>&nbsp;<td align=right>1219<td>&nbsp;<td align=right>2592<td>&nbsp;<td align=right>3456<td>&nbsp;<td>&nbsp;
29357dd7cddfSDavid du Colombier<tr>    <td>archD
2936*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>24.0<td>&nbsp;<td align=right>36.0<td>&nbsp;<td align=right>610<td>&nbsp;<td align=right>914<td>&nbsp;<td align=right>1728<td>&nbsp;<td align=right>2592<td>&nbsp;<td>&nbsp;
29377dd7cddfSDavid du Colombier<tr>    <td>archC
2938*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>24.0<td>&nbsp;<td align=right>457<td>&nbsp;<td align=right>610<td>&nbsp;<td align=right>1296<td>&nbsp;<td align=right>1728<td>&nbsp;<td>&nbsp;
29397dd7cddfSDavid du Colombier<tr>    <td>archB
2940*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>12.0<td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>305<td>&nbsp;<td align=right>457<td>&nbsp;<td align=right>864<td>&nbsp;<td align=right>1296<td>&nbsp;<td>&nbsp;
29417dd7cddfSDavid du Colombier<tr>    <td>archA
2942*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>9.0<td>&nbsp;<td align=right>12.0<td>&nbsp;<td align=right>229<td>&nbsp;<td align=right>305<td>&nbsp;<td align=right>648<td>&nbsp;<td align=right>864<td>&nbsp;<td>&nbsp;
29437dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
29447dd7cddfSDavid du Colombier<tr><th colspan=13>ISO standard
29457dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
29467dd7cddfSDavid du Colombier<tr>    <td>a0
2947*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>33.1<td>&nbsp;<td align=right>46.8<td>&nbsp;<td align=right>841<td>&nbsp;<td align=right>1189<td>&nbsp;<td align=right>2384<td>&nbsp;<td align=right>3370<td>&nbsp;<td>&nbsp;
29487dd7cddfSDavid du Colombier<tr>    <td>a1
2949*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>23.4<td>&nbsp;<td align=right>33.1<td>&nbsp;<td align=right>594<td>&nbsp;<td align=right>841<td>&nbsp;<td align=right>1684<td>&nbsp;<td align=right>2384<td>&nbsp;<td>&nbsp;
29507dd7cddfSDavid du Colombier<tr>    <td>a2
2951*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>16.5<td>&nbsp;<td align=right>23.4<td>&nbsp;<td align=right>420<td>&nbsp;<td align=right>594<td>&nbsp;<td align=right>1191<td>&nbsp;<td align=right>1684<td>&nbsp;<td>&nbsp;
29527dd7cddfSDavid du Colombier<tr>    <td>a3
2953*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>11.7<td>&nbsp;<td align=right>16.5<td>&nbsp;<td align=right>297<td>&nbsp;<td align=right>420<td>&nbsp;<td align=right>842<td>&nbsp;<td align=right>1191<td>&nbsp;<td>&nbsp;
29547dd7cddfSDavid du Colombier<tr>    <td>a4
2955*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>8.3<td>&nbsp;<td align=right>11.7<td>&nbsp;<td align=right>210<td>&nbsp;<td align=right>297<td>&nbsp;<td align=right>595<td>&nbsp;<td align=right>842<td>&nbsp;<td>&nbsp;
29567dd7cddfSDavid du Colombier<tr>    <td>a4small
2957*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>8.3<td>&nbsp;<td align=right>11.7<td>&nbsp;<td align=right>210<td>&nbsp;<td align=right>297<td>&nbsp;<td align=right>595<td>&nbsp;<td align=right>842<td>&nbsp;<td>&nbsp;
29587dd7cddfSDavid du Colombier<tr>    <td>a5
2959*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>5.8<td>&nbsp;<td align=right>8.3<td>&nbsp;<td align=right>148<td>&nbsp;<td align=right>210<td>&nbsp;<td align=right>420<td>&nbsp;<td align=right>595<td>&nbsp;<td>&nbsp;
29607dd7cddfSDavid du Colombier<tr>    <td>a6
2961*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>4.1<td>&nbsp;<td align=right>5.8<td>&nbsp;<td align=right>105<td>&nbsp;<td align=right>148<td>&nbsp;<td align=right>297<td>&nbsp;<td align=right>420<td>&nbsp;<td>&nbsp;
29627dd7cddfSDavid du Colombier<tr>    <td>a7
2963*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>2.9<td>&nbsp;<td align=right>4.1<td>&nbsp;<td align=right>74<td>&nbsp;<td align=right>105<td>&nbsp;<td align=right>210<td>&nbsp;<td align=right>297<td>&nbsp;<td>&nbsp;
29647dd7cddfSDavid du Colombier<tr>    <td>a8
2965*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>2.1<td>&nbsp;<td align=right>2.9<td>&nbsp;<td align=right>52<td>&nbsp;<td align=right>74<td>&nbsp;<td align=right>148<td>&nbsp;<td align=right>210<td>&nbsp;<td>&nbsp;
29667dd7cddfSDavid du Colombier<tr>    <td>a9
2967*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>1.5<td>&nbsp;<td align=right>2.1<td>&nbsp;<td align=right>37<td>&nbsp;<td align=right>52<td>&nbsp;<td align=right>105<td>&nbsp;<td align=right>148<td>&nbsp;<td>&nbsp;
29687dd7cddfSDavid du Colombier<tr>    <td>a10
2969*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>1.0<td>&nbsp;<td align=right>1.5<td>&nbsp;<td align=right>26<td>&nbsp;<td align=right>37<td>&nbsp;<td align=right>73<td>&nbsp;<td align=right>105<td>&nbsp;<td>&nbsp;
29707dd7cddfSDavid du Colombier<tr>    <td>isob0
2971*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>39.4<td>&nbsp;<td align=right>55.7<td>&nbsp;<td align=right>1000<td>&nbsp;<td align=right>1414<td>&nbsp;<td align=right>2835<td>&nbsp;<td align=right>4008<td>&nbsp;<td>&nbsp;
29727dd7cddfSDavid du Colombier<tr>    <td>isob1
2973*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>27.8<td>&nbsp;<td align=right>39.4<td>&nbsp;<td align=right>707<td>&nbsp;<td align=right>1000<td>&nbsp;<td align=right>2004<td>&nbsp;<td align=right>2835<td>&nbsp;<td>&nbsp;
29747dd7cddfSDavid du Colombier<tr>    <td>isob2
2975*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>19.7<td>&nbsp;<td align=right>27.8<td>&nbsp;<td align=right>500<td>&nbsp;<td align=right>707<td>&nbsp;<td align=right>1417<td>&nbsp;<td align=right>2004<td>&nbsp;<td>&nbsp;
29767dd7cddfSDavid du Colombier<tr>    <td>isob3
2977*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>13.9<td>&nbsp;<td align=right>19.7<td>&nbsp;<td align=right>353<td>&nbsp;<td align=right>500<td>&nbsp;<td align=right>1001<td>&nbsp;<td align=right>1417<td>&nbsp;<td>&nbsp;
29787dd7cddfSDavid du Colombier<tr>    <td>isob4
2979*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>9.8<td>&nbsp;<td align=right>13.9<td>&nbsp;<td align=right>250<td>&nbsp;<td align=right>353<td>&nbsp;<td align=right>709<td>&nbsp;<td align=right>1001<td>&nbsp;<td>&nbsp;
29807dd7cddfSDavid du Colombier<tr>    <td>isob5
2981*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>6.9<td>&nbsp;<td align=right>9.8<td>&nbsp;<td align=right>176<td>&nbsp;<td align=right>250<td>&nbsp;<td align=right>499<td>&nbsp;<td align=right>709<td>&nbsp;<td>&nbsp;
2982*593dc095SDavid du Colombier<tr>    <td>isob6
2983*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>4.9<td>&nbsp;<td align=right>6.9<td>&nbsp;<td align=right>125<td>&nbsp;<td align=right>176<td>&nbsp;<td align=right>354<td>&nbsp;<td align=right>499<td>&nbsp;<td>&nbsp;
29847dd7cddfSDavid du Colombier<tr>    <td>c0
2985*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>36.1<td>&nbsp;<td align=right>51.1<td>&nbsp;<td align=right>917<td>&nbsp;<td align=right>1297<td>&nbsp;<td align=right>2599<td>&nbsp;<td align=right>3677<td>&nbsp;<td>&nbsp;
29867dd7cddfSDavid du Colombier<tr>    <td>c1
2987*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>25.5<td>&nbsp;<td align=right>36.1<td>&nbsp;<td align=right>648<td>&nbsp;<td align=right>917<td>&nbsp;<td align=right>1837<td>&nbsp;<td align=right>2599<td>&nbsp;<td>&nbsp;
29887dd7cddfSDavid du Colombier<tr>    <td>c2
2989*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>25.5<td>&nbsp;<td align=right>458<td>&nbsp;<td align=right>648<td>&nbsp;<td align=right>1298<td>&nbsp;<td align=right>1837<td>&nbsp;<td>&nbsp;
29907dd7cddfSDavid du Colombier<tr>    <td>c3
2991*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>12.8<td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>324<td>&nbsp;<td align=right>458<td>&nbsp;<td align=right>918<td>&nbsp;<td align=right>1298<td>&nbsp;<td>&nbsp;
29927dd7cddfSDavid du Colombier<tr>    <td>c4
2993*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>9.0<td>&nbsp;<td align=right>12.8<td>&nbsp;<td align=right>229<td>&nbsp;<td align=right>324<td>&nbsp;<td align=right>649<td>&nbsp;<td align=right>918<td>&nbsp;<td>&nbsp;
29947dd7cddfSDavid du Colombier<tr>    <td>c5
2995*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>6.4<td>&nbsp;<td align=right>9.0<td>&nbsp;<td align=right>162<td>&nbsp;<td align=right>229<td>&nbsp;<td align=right>459<td>&nbsp;<td align=right>649<td>&nbsp;<td>&nbsp;
29967dd7cddfSDavid du Colombier<tr>    <td>c6
2997*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>4.5<td>&nbsp;<td align=right>6.4<td>&nbsp;<td align=right>114<td>&nbsp;<td align=right>162<td>&nbsp;<td align=right>323<td>&nbsp;<td align=right>459<td>&nbsp;<td>&nbsp;
29987dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
29997dd7cddfSDavid du Colombier<tr><th colspan=13>JIS standard
30007dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
30017dd7cddfSDavid du Colombier<tr>    <td>jisb0
3002*593dc095SDavid du Colombier        <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>1030<td>&nbsp;<td align=right>1456<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
30037dd7cddfSDavid du Colombier<tr>    <td>jisb1
3004*593dc095SDavid du Colombier        <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>728<td>&nbsp;<td align=right>1030<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
30057dd7cddfSDavid du Colombier<tr>    <td>jisb2
3006*593dc095SDavid du Colombier        <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>515<td>&nbsp;<td align=right>728<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
30077dd7cddfSDavid du Colombier<tr>    <td>jisb3
3008*593dc095SDavid du Colombier        <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>364<td>&nbsp;<td align=right>515<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
30097dd7cddfSDavid du Colombier<tr>    <td>jisb4
3010*593dc095SDavid du Colombier        <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>257<td>&nbsp;<td align=right>364<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
30117dd7cddfSDavid du Colombier<tr>    <td>jisb5
3012*593dc095SDavid du Colombier        <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>182<td>&nbsp;<td align=right>257<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
30137dd7cddfSDavid du Colombier<tr>    <td>jisb6
3014*593dc095SDavid du Colombier        <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>128<td>&nbsp;<td align=right>182<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
30157dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
30167dd7cddfSDavid du Colombier<tr><th colspan=13>ISO/JIS switchable
30177dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
30187dd7cddfSDavid du Colombier<tr>    <td>b0 (see * below)
30197dd7cddfSDavid du Colombier<tr>    <td>b1 (see * below)
30207dd7cddfSDavid du Colombier<tr>    <td>b2 (see * below)
30217dd7cddfSDavid du Colombier<tr>    <td>b3 (see * below)
30227dd7cddfSDavid du Colombier<tr>    <td>b4 (see * below)
30237dd7cddfSDavid du Colombier<tr>    <td>b5 (see * below)
30247dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
30257dd7cddfSDavid du Colombier<tr><th colspan=13>Other
30267dd7cddfSDavid du Colombier<tr>    <td colspan=13><hr>
30277dd7cddfSDavid du Colombier<tr>    <td>flsa
3028*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>13.0<td>&nbsp;<td align=right>216<td>&nbsp;<td align=right>330<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>936<td>&nbsp;<td>U.S. foolscap
30297dd7cddfSDavid du Colombier<tr>    <td>flse
3030*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>13.0<td>&nbsp;<td align=right>216<td>&nbsp;<td align=right>330<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>936<td>&nbsp;<td>European foolscap
30317dd7cddfSDavid du Colombier<tr>    <td>halfletter
3032*593dc095SDavid du Colombier        <td>&nbsp;<td align=right>5.5<td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>140<td>&nbsp;<td align=right>216<td>&nbsp;<td align=right>396<td>&nbsp;<td align=right>612<td>&nbsp;<td>&nbsp;
30337dd7cddfSDavid du Colombier</table>
30347dd7cddfSDavid du Colombier
30357dd7cddfSDavid du Colombier<p>
30367dd7cddfSDavid du Colombier*<em>Note:</em> Initially the B paper sizes are the ISO sizes, e.g.,
30377dd7cddfSDavid du Colombier<b><tt>b0</tt></b> is the same as <b><tt>isob0</tt></b>.  Running the file
30387dd7cddfSDavid du Colombier<b><tt>lib/jispaper.ps</tt></b> makes the B paper sizes be the JIS sizes,
30397dd7cddfSDavid du Colombiere.g., <b><tt>b0</tt></b> becomes the same as <b><tt>jisb0</tt></b>.
30407dd7cddfSDavid du Colombier
30417dd7cddfSDavid du Colombier<hr>
30427dd7cddfSDavid du Colombier
30433ff48bf5SDavid du Colombier<h2><a name="X_font_mappings"></a>Appendix: X default font mappings</h2>
30447dd7cddfSDavid du Colombier
30453ff48bf5SDavid du Colombier<h3><a name="Standard_X_server_fonts"></a>Standard X servers</h3>
30467dd7cddfSDavid du Colombier
30473ff48bf5SDavid du Colombier<h4><a name="X_regular_fonts"></a>Regular fonts</h4>
30487dd7cddfSDavid du Colombier
30497dd7cddfSDavid du Colombier<pre>    AvantGarde-Book:              -Adobe-ITC Avant Garde Gothic-Book-R-Normal--\n\
30507dd7cddfSDavid du Colombier    AvantGarde-BookOblique:       -Adobe-ITC Avant Garde Gothic-Book-O-Normal--\n\
30517dd7cddfSDavid du Colombier    AvantGarde-Demi:              -Adobe-ITC Avant Garde Gothic-Demi-R-Normal--\n\
30527dd7cddfSDavid du Colombier    AvantGarde-DemiOblique:       -Adobe-ITC Avant Garde Gothic-Demi-O-Normal--\n\
30537dd7cddfSDavid du Colombier    Bookman-Demi:                 -Adobe-ITC Bookman-Demi-R-Normal--\n\
30547dd7cddfSDavid du Colombier    Bookman-DemiItalic:           -Adobe-ITC Bookman-Demi-I-Normal--\n\
30557dd7cddfSDavid du Colombier    Bookman-Light:                -Adobe-ITC Bookman-Light-R-Normal--\n\
30567dd7cddfSDavid du Colombier    Bookman-LightItalic:          -Adobe-ITC Bookman-Light-I-Normal--\n\
30577dd7cddfSDavid du Colombier    Courier:                      -Adobe-Courier-Medium-R-Normal--\n\
30587dd7cddfSDavid du Colombier    Courier-Bold:                 -Adobe-Courier-Bold-R-Normal--\n\
30597dd7cddfSDavid du Colombier    Courier-BoldOblique:          -Adobe-Courier-Bold-O-Normal--\n\
30607dd7cddfSDavid du Colombier    Courier-Oblique:              -Adobe-Courier-Medium-O-Normal--\n\
30617dd7cddfSDavid du Colombier    Helvetica:                    -Adobe-Helvetica-Medium-R-Normal--\n\
30627dd7cddfSDavid du Colombier    Helvetica-Bold:               -Adobe-Helvetica-Bold-R-Normal--\n\
30637dd7cddfSDavid du Colombier    Helvetica-BoldOblique:        -Adobe-Helvetica-Bold-O-Normal--\n\
30647dd7cddfSDavid du Colombier    Helvetica-Narrow:             -Adobe-Helvetica-Medium-R-Narrow--\n\
30657dd7cddfSDavid du Colombier    Helvetica-Narrow-Bold:        -Adobe-Helvetica-Bold-R-Narrow--\n\
30667dd7cddfSDavid du Colombier    Helvetica-Narrow-BoldOblique: -Adobe-Helvetica-Bold-O-Narrow--\n\
30677dd7cddfSDavid du Colombier    Helvetica-Narrow-Oblique:     -Adobe-Helvetica-Medium-O-Narrow--\n\
30687dd7cddfSDavid du Colombier    Helvetica-Oblique:            -Adobe-Helvetica-Medium-O-Normal--\n\
30697dd7cddfSDavid du Colombier    NewCenturySchlbk-Bold:        -Adobe-New Century Schoolbook-Bold-R-Normal--\n\
30707dd7cddfSDavid du Colombier    NewCenturySchlbk-BoldItalic:  -Adobe-New Century Schoolbook-Bold-I-Normal--\n\
30717dd7cddfSDavid du Colombier    NewCenturySchlbk-Italic:      -Adobe-New Century Schoolbook-Medium-I-Normal--\n\
30727dd7cddfSDavid du Colombier    NewCenturySchlbk-Roman:       -Adobe-New Century Schoolbook-Medium-R-Normal--\n\
30737dd7cddfSDavid du Colombier    Palatino-Bold:                -Adobe-Palatino-Bold-R-Normal--\n\
30747dd7cddfSDavid du Colombier    Palatino-BoldItalic:          -Adobe-Palatino-Bold-I-Normal--\n\
30757dd7cddfSDavid du Colombier    Palatino-Italic:              -Adobe-Palatino-Medium-I-Normal--\n\
30767dd7cddfSDavid du Colombier    Palatino-Roman:               -Adobe-Palatino-Medium-R-Normal--\n\
30777dd7cddfSDavid du Colombier    Times-Bold:                   -Adobe-Times-Bold-R-Normal--\n\
30787dd7cddfSDavid du Colombier    Times-BoldItalic:             -Adobe-Times-Bold-I-Normal--\n\
30797dd7cddfSDavid du Colombier    Times-Italic:                 -Adobe-Times-Medium-I-Normal--\n\
30807dd7cddfSDavid du Colombier    Times-Roman:                  -Adobe-Times-Medium-R-Normal--\n\
30817dd7cddfSDavid du Colombier    ZapfChancery-MediumItalic:    -Adobe-ITC Zapf Chancery-Medium-I-Normal--
30823ff48bf5SDavid du Colombier</pre>
30837dd7cddfSDavid du Colombier
30843ff48bf5SDavid du Colombier<h4><a name="X_symbol_fonts"></a>Symbol fonts</h4>
30857dd7cddfSDavid du Colombier
30867dd7cddfSDavid du Colombier<pre>    Symbol:                       -Adobe-Symbol-Medium-R-Normal--
30873ff48bf5SDavid du Colombier</pre>
30887dd7cddfSDavid du Colombier
30893ff48bf5SDavid du Colombier<h4><a name="X_dingbat_fonts"></a>Dingbat fonts</h4>
30907dd7cddfSDavid du Colombier
30917dd7cddfSDavid du Colombier<pre>    ZapfDingbats:                 -Adobe-ITC Zapf Dingbats-Medium-R-Normal--
30923ff48bf5SDavid du Colombier</pre>
30937dd7cddfSDavid du Colombier
30943ff48bf5SDavid du Colombier<h3><a name="OpenWindows_fonts"></a>Sun OpenWindows</h3>
30957dd7cddfSDavid du Colombier
30967dd7cddfSDavid du Colombier<p>
30977dd7cddfSDavid du ColombierFor Sun's X11/NeWS one can use the OpenWindows scalable fonts instead,
30987dd7cddfSDavid du Colombierwhich gives good output for any point size.  In this environment, the
30997dd7cddfSDavid du Colombierrelevant section of the resource file should look like this:
31007dd7cddfSDavid du Colombier
31017dd7cddfSDavid du Colombier<pre>Ghostscript.regularFonts: \
31027dd7cddfSDavid du Colombier    AvantGarde-Book:              -itc-avantgarde-book-r-normal-- \n\
31037dd7cddfSDavid du Colombier    AvantGarde-BookOblique:       -itc-avantgarde-book-o-normal-- \n\
31047dd7cddfSDavid du Colombier    AvantGarde-Demi:              -itc-avantgarde-demi-r-normal-- \n\
31057dd7cddfSDavid du Colombier    AvantGarde-DemiOblique:       -itc-avantgarde-demi-o-normal-- \n\
31067dd7cddfSDavid du Colombier    Bembo:                        -monotype-bembo-medium-r-normal-- \n\
31077dd7cddfSDavid du Colombier    Bembo-Bold:                   -monotype-bembo-bold-r-normal-- \n\
31087dd7cddfSDavid du Colombier    Bembo-BoldItalic:             -monotype-bembo-bold-i-normal-- \n\
31097dd7cddfSDavid du Colombier    Bembo-Italic:                 -monotype-bembo-medium-i-normal-- \n\
31107dd7cddfSDavid du Colombier    Bookman-Demi:                 -itc-bookman-demi-r-normal-- \n\
31117dd7cddfSDavid du Colombier    Bookman-DemiItalic:           -itc-bookman-demi-i-normal-- \n\
31127dd7cddfSDavid du Colombier    Bookman-Light:                -itc-bookman-light-r-normal-- \n\
31137dd7cddfSDavid du Colombier    Bookman-LightItalic:          -itc-bookman-light-i-normal-- \n\
31147dd7cddfSDavid du Colombier    Courier:                      -itc-courier-medium-r-normal-- \n\
31157dd7cddfSDavid du Colombier    Courier-Bold:                 -itc-courier-bold-r-normal-- \n\
31167dd7cddfSDavid du Colombier    Courier-BoldOblique:          -itc-courier-bold-o-normal-- \n\
31177dd7cddfSDavid du Colombier    Courier-Oblique:              -itc-courier-medium-o-normal-- \n\
31187dd7cddfSDavid du Colombier    GillSans:                     -monotype-gill-medium-r-normal-sans- \n\
31197dd7cddfSDavid du Colombier    GillSans-Bold:                -monotype-gill-bold-r-normal-sans- \n\
31207dd7cddfSDavid du Colombier    GillSans-BoldItalic:          -monotype-gill-bold-i-normal-sans- \n\
31217dd7cddfSDavid du Colombier    GillSans-Italic:              -monotype-gill-normal-i-normal-sans- \n\
31227dd7cddfSDavid du Colombier    Helvetica:                    -linotype-helvetica-medium-r-normal-- \n\
31237dd7cddfSDavid du Colombier    Helvetica-Bold:               -linotype-helvetica-bold-r-normal-- \n\
31247dd7cddfSDavid du Colombier    Helvetica-BoldOblique:        -linotype-helvetica-bold-o-normal-- \n\
31257dd7cddfSDavid du Colombier    Helvetica-Narrow:             -linotype-helvetica-medium-r-narrow-- \n\
31267dd7cddfSDavid du Colombier    Helvetica-Narrow-Bold:        -linotype-helvetica-bold-r-narrow-- \n\
31277dd7cddfSDavid du Colombier    Helvetica-Narrow-BoldOblique: -linotype-helvetica-bold-o-narrow-- \n\
31287dd7cddfSDavid du Colombier    Helvetica-Narrow-Oblique:     -linotype-helvetica-medium-o-narrow-- \n\
31297dd7cddfSDavid du Colombier    Helvetica-Oblique:            -linotype-helvetica-medium-o-normal-- \n\
31307dd7cddfSDavid du Colombier    LucidaBright:                 -b&amp;h-lucidabright-medium-r-normal-- \n\
31317dd7cddfSDavid du Colombier    LucidaBright-Demi:            -b&amp;h-lucidabright-demibold-r-normal-- \n\
31327dd7cddfSDavid du Colombier    LucidaBright-DemiItalic:      -b&amp;h-lucidabright-demibold-i-normal-- \n\
31337dd7cddfSDavid du Colombier    LucidaBright-Italic:          -b&amp;h-lucidabright-medium-i-normal-- \n\
31347dd7cddfSDavid du Colombier    LucidaSans:                   -b&amp;h-lucida-medium-r-normal-sans- \n\
31357dd7cddfSDavid du Colombier    LucidaSans-Bold:              -b&amp;h-lucida-bold-r-normal-sans- \n\
31367dd7cddfSDavid du Colombier    LucidaSans-BoldItalic:        -b&amp;h-lucida-bold-i-normal-sans- \n\
31377dd7cddfSDavid du Colombier    LucidaSans-Italic:            -b&amp;h-lucida-medium-i-normal-sans- \n\
31387dd7cddfSDavid du Colombier    LucidaSans-Typewriter:        -b&amp;h-lucidatypewriter-medium-r-normal-sans- \n\
31397dd7cddfSDavid du Colombier    LucidaSans-TypewriterBold:    -b&amp;h-lucidatypewriter-bold-r-normal-sans- \n\
31407dd7cddfSDavid du Colombier    NewCenturySchlbk-BoldItalic:  -linotype-new century schoolbook-bold-i-normal-- \n\
31417dd7cddfSDavid du Colombier    NewCenturySchlbk-Bold:        -linotype-new century schoolbook-bold-r-normal-- \n\
31427dd7cddfSDavid du Colombier    NewCenturySchlbk-Italic:      -linotype-new century schoolbook-medium-i-normal-- \n\
31437dd7cddfSDavid du Colombier    NewCenturySchlbk-Roman:       -linotype-new century schoolbook-medium-r-normal-- \n\
31447dd7cddfSDavid du Colombier    Palatino-Bold:                -linotype-palatino-bold-r-normal-- \n\
31457dd7cddfSDavid du Colombier    Palatino-BoldItalic:          -linotype-palatino-bold-i-normal-- \n\
31467dd7cddfSDavid du Colombier    Palatino-Italic:              -linotype-palatino-medium-i-normal-- \n\
31477dd7cddfSDavid du Colombier    Palatino-Roman:               -linotype-palatino-medium-r-normal-- \n\
31487dd7cddfSDavid du Colombier    Rockwell:                     -monotype-rockwell-medium-r-normal-- \n\
31497dd7cddfSDavid du Colombier    Rockwell-Bold:                -monotype-rockwell-bold-r-normal-- \n\
31507dd7cddfSDavid du Colombier    Rockwell-BoldItalic:          -monotype-rockwell-bold-i-normal-- \n\
31517dd7cddfSDavid du Colombier    Rockwell-Italic:              -monotype-rockwell-medium-i-normal-- \n\
31527dd7cddfSDavid du Colombier    Times-Bold:                   -linotype-times-bold-r-normal-- \n\
31537dd7cddfSDavid du Colombier    Times-BoldItalic:             -linotype-times-bold-i-normal-- \n\
31547dd7cddfSDavid du Colombier    Times-Italic:                 -linotype-times-medium-i-normal-- \n\
31557dd7cddfSDavid du Colombier    Times-Roman:                  -linotype-times-medium-r-normal-- \n\
31567dd7cddfSDavid du Colombier    Utopia-Bold:                  -adobe-utopia-bold-r-normal-- \n\
31577dd7cddfSDavid du Colombier    Utopia-BoldItalic:            -adobe-utopia-bold-i-normal-- \n\
31587dd7cddfSDavid du Colombier    Utopia-Italic:                -adobe-utopia-regular-i-normal-- \n\
31597dd7cddfSDavid du Colombier    Utopia-Regular:               -adobe-utopia-regular-r-normal-- \n\
31607dd7cddfSDavid du Colombier    ZapfChancery-MediumItalic:    -itc-zapfchancery-medium-i-normal-- \n
31617dd7cddfSDavid du ColombierGhostscript.dingbatFonts: \
31627dd7cddfSDavid du Colombier    ZapfDingbats:                 -itc-zapfdingbats-medium-r-normal--
31637dd7cddfSDavid du ColombierGhostscript.symbolFonts: \
31647dd7cddfSDavid du Colombier    Symbol:                       --symbol-medium-r-normal--
31653ff48bf5SDavid du Colombier</pre>
31667dd7cddfSDavid du Colombier
3167*593dc095SDavid du Colombier
3168*593dc095SDavid du Colombier<h2><a name="FAPI_run"></a>Running Ghostscript with 3d party font renderers</h2>
3169*593dc095SDavid du Colombier
3170*593dc095SDavid du Colombier<p>
3171*593dc095SDavid du ColombierFont API (FAPI) is a new feature which allows to attach 3d party font renderers to Ghostscript.
3172*593dc095SDavid du ColombierThis section explains how to run Ghostscript with 3d party font renderers,
3173*593dc095SDavid du Colombiersuch as Agfa UFST or Free Type.
3174*593dc095SDavid du Colombier
3175*593dc095SDavid du Colombier<p>
3176*593dc095SDavid du Colombier<em>Note: To run Ghostscript with Agfa UFST you need a license from Agfa.
3177*593dc095SDavid du ColombierPlease ignore issues about UFST if you haven't got it.
3178*593dc095SDavid du Colombier</em>
3179*593dc095SDavid du Colombier
3180*593dc095SDavid du Colombier<p>
3181*593dc095SDavid du Colombier<em>
3182*593dc095SDavid du ColombierImportant note: Third-party font renderers are incompatible
3183*593dc095SDavid du Colombierwith devices that can embed fonts in their output (such as pdfwrite),
3184*593dc095SDavid du Colombierbecause such renderers store fonts in a form from which Ghostscript cannot
3185*593dc095SDavid du Colombierget the necessary information for embedding.  Ghostscript disables such
3186*593dc095SDavid du Colombierrenderers when such device is being used.  In particular, UFST and Free Type are
3187*593dc095SDavid du Colombierdisabled while running Ghostscript with the <b><tt>pdfwrite</tt></b>
3188*593dc095SDavid du Colombierdevice.
3189*593dc095SDavid du Colombier</em>
3190*593dc095SDavid du Colombier
3191*593dc095SDavid du Colombier<p>
3192*593dc095SDavid du ColombierTo run Ghostscript with Free Type, you first need to build Ghostscript
3193*593dc095SDavid du Colombierwith the Free Type bridge. Refer <a href="Make.htm#FT_build">How to build Ghostscript with Free Type</a>.
3194*593dc095SDavid du Colombier<p>
3195*593dc095SDavid du ColombierTo run Ghostscript with UFST, you first need to build Ghostscript
3196*593dc095SDavid du Colombierwith the UFST bridge. Refer <a href="Make.htm#UFST_build">How to build Ghostscript with UFST</a>.
3197*593dc095SDavid du ColombierBoth bridges may run together.
3198*593dc095SDavid du Colombier<p>
3199*593dc095SDavid du Colombier
3200*593dc095SDavid du Colombier<p>
3201*593dc095SDavid du ColombierThen you need to obtain the Decoding resources from Artifex Software Inc. and install them with Ghostscript.
3202*593dc095SDavid du ColombierJust copy the files to the <b><tt>Resource/Decoding</tt></b> directory (or to the subdirectory
3203*593dc095SDavid du Colombier<b><tt>Decoding</tt></b> of a directory, which is specified in <b><tt>GenericResourcePath</tt></b>).
3204*593dc095SDavid du Colombier
3205*593dc095SDavid du Colombier
3206*593dc095SDavid du Colombier<p>
3207*593dc095SDavid du ColombierThere are 2 ways to handle fonts with a 3d party font renderer (FAPI). First, you can substitute
3208*593dc095SDavid du Colombierany FAPI-handled font to a PostScript font, using special map files.
3209*593dc095SDavid du ColombierSecond, you can redirect PostScript fonts to FAPI, setting
3210*593dc095SDavid du Colombierentries in <b><tt>lib/FAPIconfig</tt></b> file.
3211*593dc095SDavid du Colombier
3212*593dc095SDavid du Colombier<p>
3213*593dc095SDavid du ColombierThe file <b><tt>lib/FAPIfontmap</tt></b> defines a map table for FAPI-handled fonts.
3214*593dc095SDavid du ColombierThe format of <b><tt>lib/FAPIfontmap</tt></b> is explained below.
3215*593dc095SDavid du Colombier
3216*593dc095SDavid du Colombier<p>
3217*593dc095SDavid du ColombierFont files being handled with FAPI may reside in any directory in your hard disk.
3218*593dc095SDavid du ColombierPaths to them to be specified in <b><tt>lib/FAPIfontmap</tt></b>. The path may be either
3219*593dc095SDavid du Colombierabsolute or relative. Relative ones are being resolved from the path,
3220*593dc095SDavid du Colombierwhich is specified in <b><tt>lib/FAPIconfig</tt></b> file.
3221*593dc095SDavid du Colombier
3222*593dc095SDavid du Colombier<p>
3223*593dc095SDavid du ColombierThe file <b><tt>lib/FAPIfontmap</tt></b> is actually special PostScript code.
3224*593dc095SDavid du ColombierIt contains records for each font being rendered with FAPI.
3225*593dc095SDavid du ColombierRecords must end with semicolon. Each record is a pair.
3226*593dc095SDavid du ColombierThe first element of the pair is the font name (the name that PostScript
3227*593dc095SDavid du Colombierdocuments use to access the font, which may differ
3228*593dc095SDavid du Colombierfrom real name of the font which the font file defines).
3229*593dc095SDavid du ColombierThe second element is a dictionary with entries :
3230*593dc095SDavid du Colombier
3231*593dc095SDavid du Colombier<table cellpadding=0 cellspacing=10>
3232*593dc095SDavid du Colombier
3233*593dc095SDavid du Colombier<tr>    <th>Key
3234*593dc095SDavid du Colombier        <th>Type
3235*593dc095SDavid du Colombier        <th>Description
3236*593dc095SDavid du Colombier<tr>    <td>Path
3237*593dc095SDavid du Colombier        <td>string
3238*593dc095SDavid du Colombier        <td>Absolute path to font file, or relative path to font file from the FontPath value,
3239*593dc095SDavid du Colombier            being specified in <b><tt>lib/FAPIconfig</tt></b>.
3240*593dc095SDavid du Colombier<tr>    <td>FontType
3241*593dc095SDavid du Colombier        <td>interger
3242*593dc095SDavid du Colombier        <td>PostScript type for this font. Only 1 and 42 are currently allowed.
3243*593dc095SDavid du Colombier            Note that this is unrelated to the real type of the font file -
3244*593dc095SDavid du Colombier            the bridge will perform a format conversion.
3245*593dc095SDavid du Colombier<tr>    <td>FAPI
3246*593dc095SDavid du Colombier        <td>name
3247*593dc095SDavid du Colombier        <td>Name of the renderer to be used with the font.
3248*593dc095SDavid du Colombier            Only <b><tt>/AgfaUFST</tt></b> and <b><tt>/FreeType</tt></b> are now allowed.
3249*593dc095SDavid du Colombier<tr>    <td>SubfontId
3250*593dc095SDavid du Colombier        <td>integer
3251*593dc095SDavid du Colombier        <td>(optional) Index of the font in font collection, such as FCO or TTC.
3252*593dc095SDavid du Colombier            It is being ignored if Path doesn't specify a collection.
3253*593dc095SDavid du Colombier            Note that Free Type can't handle FCO.
3254*593dc095SDavid du Colombier            Default value is 0.
3255*593dc095SDavid du Colombier<tr>    <td>Decoding
3256*593dc095SDavid du Colombier        <td>name
3257*593dc095SDavid du Colombier        <td>(optional) The name of a Decoding resource to be used with the font.
3258*593dc095SDavid du Colombier            If specified, <b><tt>lib/xlatmap</tt></b> (see below) doesn't work for this font.
3259*593dc095SDavid du Colombier</table>
3260*593dc095SDavid du Colombier
3261*593dc095SDavid du Colombier<p>
3262*593dc095SDavid du ColombierExample of FAPI font map record :
3263*593dc095SDavid du Colombier<blockquote>
3264*593dc095SDavid du Colombier<b><tt>
3265*593dc095SDavid du Colombier/FCO1        &lt&lt /Path (/AFPL/Agfa/fontdata/MTFONTS/PCLPS3/MT1/PCLP3__F.fco) /FontType 1 /FAPI /AgfaUFST &gt&gt ;
3266*593dc095SDavid du Colombier</tt></b>
3267*593dc095SDavid du Colombier</blockquote>
3268*593dc095SDavid du Colombier
3269*593dc095SDavid du Colombier<p>
3270*593dc095SDavid du ColombierNote that <b><tt>lib/FAPIfontmap</tt></b> specifies only instances of
3271*593dc095SDavid du ColombierFont category. CID fonts to be listed in another map file.
3272*593dc095SDavid du Colombier
3273*593dc095SDavid du Colombier<p>
3274*593dc095SDavid du ColombierThe file <b><tt>lib/FAPIcidfmap</tt></b> defines a mapping table for
3275*593dc095SDavid du ColombierCIDFont resources. It contains records for each CID font being rendered with FAPI.
3276*593dc095SDavid du ColombierThe format is similar to <b><tt>lib/FAPIfontmap</tt></b>,
3277*593dc095SDavid du Colombierbut dictionaries must contain few different entries :
3278*593dc095SDavid du Colombier
3279*593dc095SDavid du Colombier<table cellpadding=0 cellspacing=10>
3280*593dc095SDavid du Colombier
3281*593dc095SDavid du Colombier<tr>    <th>Key
3282*593dc095SDavid du Colombier        <th>Type
3283*593dc095SDavid du Colombier        <th>Description
3284*593dc095SDavid du Colombier<tr>    <td>Path
3285*593dc095SDavid du Colombier        <td>string
3286*593dc095SDavid du Colombier        <td>Absolute path to font file, or relative path to font file from the CIDFontPath value,
3287*593dc095SDavid du Colombier            being specified in <b><tt>lib/FAPIconfig</tt></b>.
3288*593dc095SDavid du Colombier<tr>    <td>CIDFontType
3289*593dc095SDavid du Colombier        <td>interger
3290*593dc095SDavid du Colombier        <td>PostScript type for this CID font. Only 0, 1 and 2 are currently allowed.
3291*593dc095SDavid du Colombier            Note that this is unrelated to the real type of the font file -
3292*593dc095SDavid du Colombier            the bridge will perform format conversion.
3293*593dc095SDavid du Colombier<tr>    <td>FAPI
3294*593dc095SDavid du Colombier        <td>name
3295*593dc095SDavid du Colombier        <td>Name of the renderer to be used with the font.
3296*593dc095SDavid du Colombier            Only <b><tt>/AgfaUFST</tt></b> and <b><tt>/FreeType</tt></b> are now allowed.
3297*593dc095SDavid du Colombier<tr>    <td>SubfontId
3298*593dc095SDavid du Colombier        <td>integer
3299*593dc095SDavid du Colombier        <td>(optional) Index of the font in font collection, such as FCO or TTC.
3300*593dc095SDavid du Colombier            It is being ignored if Path doesn't specify a collection.
3301*593dc095SDavid du Colombier            Default value is 0.
3302*593dc095SDavid du Colombier<tr>    <td>CSI
3303*593dc095SDavid du Colombier        <td>array of 2 elements
3304*593dc095SDavid du Colombier        <td>(required) Information for building <b><tt>CIDSystemInfo</tt></b>.
3305*593dc095SDavid du Colombier            The first element is a string, which specifies <b><tt>Ordering</tt></b>.
3306*593dc095SDavid du Colombier            The second element is a number, which specifies <b><tt>Supplement</tt></b>.
3307*593dc095SDavid du Colombier</table>
3308*593dc095SDavid du Colombier
3309*593dc095SDavid du Colombier<p>
3310*593dc095SDavid du ColombierExample of FAPI CID font map record :
3311*593dc095SDavid du Colombier<blockquote>
3312*593dc095SDavid du Colombier<b><tt>
3313*593dc095SDavid du Colombier/HeiseiKakuGo-W5  &lt&lt /Path (/WIN2000/Fonts/PMINGLIU.TTF) /CIDFontType 0 /FAPI /AgfaUFST /CSI [(Japan1) 2] &gt&gt ;
3314*593dc095SDavid du Colombier</tt></b>
3315*593dc095SDavid du Colombier</blockquote>
3316*593dc095SDavid du Colombier
3317*593dc095SDavid du Colombier
3318*593dc095SDavid du Colombier
3319*593dc095SDavid du Colombier
3320*593dc095SDavid du Colombier<p>
3321*593dc095SDavid du ColombierThe control file <b><tt>lib/FAPIconfig</tt></b> defines 4 entries :
3322*593dc095SDavid du Colombier
3323*593dc095SDavid du Colombier<table cellpadding=0 cellspacing=10>
3324*593dc095SDavid du Colombier<tr>    <th>Key
3325*593dc095SDavid du Colombier        <th>Type
3326*593dc095SDavid du Colombier        <th>Description
3327*593dc095SDavid du Colombier<tr>    <td>FontPath
3328*593dc095SDavid du Colombier        <td>string
3329*593dc095SDavid du Colombier        <td>Absolute path to a directory, which contains fonts. Used to resolve
3330*593dc095SDavid du Colombier            relative paths in <b><tt>lib/FAPIfontmap</tt></b>.
3331*593dc095SDavid du Colombier<tr>    <td>CIDFontPath
3332*593dc095SDavid du Colombier        <td>string
3333*593dc095SDavid du Colombier        <td>Absolute path to a directory, which contains fonts to substitute to CID fonts.
3334*593dc095SDavid du Colombier            Used to resolve relative paths in <b><tt>lib/FAPIcidfmap</tt></b>.
3335*593dc095SDavid du Colombier            It may be same or different than FontPath.
3336*593dc095SDavid du Colombier<tr>    <td>HookDiskFonts
3337*593dc095SDavid du Colombier        <td>array of integers.
3338*593dc095SDavid du Colombier        <td>List of PS font types to be handled with FAPI.
3339*593dc095SDavid du Colombier            This controls other fonts that ones listed in <b><tt>lib/FAPIfontmap</tt></b>
3340*593dc095SDavid du Colombier            and <b><tt>lib/FAPIcidfmap</tt></b> - such ones are PS fonts installed to
3341*593dc095SDavid du Colombier            Ghostscript with <b><tt>lib/fontmap</tt></b> or with <b><tt>GS_FONTPATH</tt></b>,
3342*593dc095SDavid du Colombier            or regular CID font resources. Unlisted font types will be
3343*593dc095SDavid du Colombier            rendered with the native Ghostscript font renderer.
3344*593dc095SDavid du Colombier            Only allowed values now are 1,9,11,42. Note that 9 and 11
3345*593dc095SDavid du Colombier            correspond to CIDFontType 0 and 2.
3346*593dc095SDavid du Colombier<tr>    <td>HookEmbeddedFonts
3347*593dc095SDavid du Colombier        <td>array of integers.
3348*593dc095SDavid du Colombier        <td>List of PS font types to be handled with FAPI.
3349*593dc095SDavid du Colombier            This controls fonts being embedded into a document -
3350*593dc095SDavid du Colombier            either fonts or CID font resources. Unlisted font types will be
3351*593dc095SDavid du Colombier            rendered with the native Ghostscript font renderer.
3352*593dc095SDavid du Colombier            Only allowed values now are 1,9,11,42. Note that 9 and 11
3353*593dc095SDavid du Colombier            correspond to CIDFontType 0 and 2.
3354*593dc095SDavid du Colombier
3355*593dc095SDavid du Colombier</table>
3356*593dc095SDavid du Colombier
3357*593dc095SDavid du Colombier<p>
3358*593dc095SDavid du ColombierYou may need to customize the file <b><tt>lib/xlatmap</tt></b>. Follow instructions in it.
3359*593dc095SDavid du Colombier
3360*593dc095SDavid du Colombier<p>
3361*593dc095SDavid du ColombierNote that UFST and Free Type cannot handle some Ghostscript fonts because
3362*593dc095SDavid du Colombierthey does not include a PostScript interpreter and therefore has stronger restrictions on
3363*593dc095SDavid du Colombierfont formats than Ghostscript itself does.
3364*593dc095SDavid du ColombierIf their font types are listed in HookDiskFonts or in HookEmbeddedFonts,
3365*593dc095SDavid du ColombierGhostscript interpret them as PS files, then serializes font data into a RAM buffer and
3366*593dc095SDavid du Colombierpasses it to FAPI as PCLEOs.
3367*593dc095SDavid du Colombier
3368*593dc095SDavid du Colombier<p>
3369*593dc095SDavid du Colombier
3370*593dc095SDavid du Colombier
3371*593dc095SDavid du Colombier
33727dd7cddfSDavid du Colombier<!-- [2.0 end contents] ==================================================== -->
33737dd7cddfSDavid du Colombier
33747dd7cddfSDavid du Colombier<!-- [3.0 begin visible trailer] =========================================== -->
33757dd7cddfSDavid du Colombier<hr>
33767dd7cddfSDavid du Colombier
33773ff48bf5SDavid du Colombier<p>
3378*593dc095SDavid du Colombier<small>Copyright &copy; 1996-2002 artofcode LLC. All rights reserved.</small>
33797dd7cddfSDavid du Colombier
33807dd7cddfSDavid du Colombier<p>
3381*593dc095SDavid du ColombierThis software is provided AS-IS with no warranty, either express or
3382*593dc095SDavid du Colombierimplied.
3383*593dc095SDavid du Colombier
3384*593dc095SDavid du ColombierThis software is distributed under license and may not be copied,
3385*593dc095SDavid du Colombiermodified or distributed except as expressly authorized under the terms
3386*593dc095SDavid du Colombierof the license contained in the file LICENSE in this distribution.
3387*593dc095SDavid du Colombier
3388*593dc095SDavid du ColombierFor more information about licensing, please refer to
3389*593dc095SDavid du Colombierhttp://www.ghostscript.com/licensing/. For information on
3390*593dc095SDavid du Colombiercommercial licensing, go to http://www.artifex.com/licensing/ or
3391*593dc095SDavid du Colombiercontact Artifex Software, Inc., 101 Lucas Valley Road #110,
3392*593dc095SDavid du ColombierSan Rafael, CA  94903, U.S.A., +1(415)492-9861.
33937dd7cddfSDavid du Colombier
33943ff48bf5SDavid du Colombier<p>
3395*593dc095SDavid du Colombier<small>Ghostscript version 8.53, 20 October 2005
33967dd7cddfSDavid du Colombier
33977dd7cddfSDavid du Colombier<!-- [3.0 end visible trailer] ============================================= -->
33987dd7cddfSDavid du Colombier
3399*593dc095SDavid du Colombier</small></h3></body>
34007dd7cddfSDavid du Colombier</html>
3401