13ff48bf5SDavid du Colombier<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 27dd7cddfSDavid du Colombier<html> 37dd7cddfSDavid du Colombier<head> 47dd7cddfSDavid du Colombier<title>Details of Ghostscript output devices</title> 5*593dc095SDavid du Colombier<!-- $Id: Devices.htm,v 1.90 2005/10/20 19:46:23 ray Exp $ --> 67dd7cddfSDavid du Colombier<!-- Originally: devices.txt --> 73ff48bf5SDavid du Colombier<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style"> 87dd7cddfSDavid du Colombier</head> 97dd7cddfSDavid du Colombier 107dd7cddfSDavid du Colombier<body> 117dd7cddfSDavid du Colombier<!-- [1.0 begin visible header] ============================================ --> 127dd7cddfSDavid du Colombier 137dd7cddfSDavid du Colombier<!-- [1.1 begin headline] ================================================== --> 147dd7cddfSDavid du Colombier 153ff48bf5SDavid du Colombier<h1>Details of Ghostscript output devices</h1> 167dd7cddfSDavid du Colombier 177dd7cddfSDavid du Colombier<!-- [1.1 end headline] ==================================================== --> 187dd7cddfSDavid du Colombier 197dd7cddfSDavid du Colombier<!-- [1.2 begin table of contents] ========================================= --> 207dd7cddfSDavid du Colombier 217dd7cddfSDavid du Colombier<h2>Table of contents</h2> 227dd7cddfSDavid du Colombier 237dd7cddfSDavid du Colombier<blockquote><ul> 247dd7cddfSDavid du Colombier<li><a href="#Measurements">Notes on measurements</a> 25*593dc095SDavid du Colombier<li><a href="#File_formats">Image file formats</a> 263ff48bf5SDavid du Colombier<ul> 27*593dc095SDavid du Colombier<li><a href="#PNG">PNG file format</a> 287dd7cddfSDavid du Colombier<li><a href="#JFIF">JPEG file format (JFIF)</a> 29*593dc095SDavid du Colombier<li><a href="#PNM">PNM file format</a> 303ff48bf5SDavid du Colombier<li><a href="#TIFF">TIFF file formats</a> 31*593dc095SDavid du Colombier<li><a href="#fax">fax file formats</a> 32*593dc095SDavid du Colombier<li><a href="#BMP">BMP file format</a> 33*593dc095SDavid du Colombier<li><a href="#PCX">PCX file format</a> 34*593dc095SDavid du Colombier<li><a href="#PSD">PSD file format (DeviceN color model)</a> 35*593dc095SDavid du Colombier</ul> 36*593dc095SDavid du Colombier<li><a href="#High-level">High level formats</a> 37*593dc095SDavid du Colombier<ul> 38*593dc095SDavid du Colombier<li><a href="#PDF">PDF file output</a> 39*593dc095SDavid du Colombier<li><a href="#PS">PostScript file output</a> 40*593dc095SDavid du Colombier<li><a href="#EPS">EPS file output</a> 41*593dc095SDavid du Colombier<li><a href="#PXL">PCL-XL file output</a> 423ff48bf5SDavid du Colombier</ul> 433ff48bf5SDavid du Colombier<li><a href="#Display_devices">Display devices</a> 443ff48bf5SDavid du Colombier<ul> 453ff48bf5SDavid du Colombier<li><a href="#x11_devices">X Window System</a> 46*593dc095SDavid du Colombier<li><a href="#display_device">display device (MS Windows, OS/2, gtk+)</a> 473ff48bf5SDavid du Colombier</ul> 48*593dc095SDavid du Colombier<li><a href="#IJS">IJS - Inkjet and other raster devices</a> 49*593dc095SDavid du Colombier<li><a href="#Rinkj">Rinkj - Resplendent inkjet driver</a> 503ff48bf5SDavid du Colombier<li><a href="#HP_ijs">HP Deskjet official drivers</a> 51*593dc095SDavid du Colombier<li><a href="#gimp-print">Gimp-Print driver collection</a> 52*593dc095SDavid du Colombier<li><a href="#Win">MS Windows printers</a> 537dd7cddfSDavid du Colombier<li><a href="#SPARCprinter">Sun SPARCprinter</a> 547dd7cddfSDavid du Colombier<ul> 557dd7cddfSDavid du Colombier<li><a href="#SPARC_install">Installation</a> 567dd7cddfSDavid du Colombier<li><a href="#SPARC_problems">Problems</a> 577dd7cddfSDavid du Colombier</ul> 587dd7cddfSDavid du Colombier<li><a href="#Apple">Apple dot matrix printer</a> 59*593dc095SDavid du Colombier<li><a href="#Test">Test devices</a> 60*593dc095SDavid du Colombier<ul> 61*593dc095SDavid du Colombier<li><a href="#Permute">Permutation (DeviceN color model)</a> 62*593dc095SDavid du Colombier<li><a href="#SPOT">spotcmyk (DeviceN color model)</a> 63*593dc095SDavid du Colombier<li><a href="#XCF">XCF (DeviceN color model)</a> 64*593dc095SDavid du Colombier<li><a href="#bitraw">Raw 'bit' devices</a> 65*593dc095SDavid du Colombier</ul> 667dd7cddfSDavid du Colombier</ul></blockquote> 677dd7cddfSDavid du Colombier 687dd7cddfSDavid du Colombier<!-- [1.2 end table of contents] =========================================== --> 697dd7cddfSDavid du Colombier 707dd7cddfSDavid du Colombier<!-- [1.3 begin hint] ====================================================== --> 717dd7cddfSDavid du Colombier 727dd7cddfSDavid du Colombier<p>For other information, see the <a href="Readme.htm">Ghostscript 737dd7cddfSDavid du Colombieroverview</a>. You may also be interested in <a href="Make.htm">how to 747dd7cddfSDavid du Colombierbuild Ghostscript</a> and <a href="Install.htm">install it</a>, as well as 757dd7cddfSDavid du Colombierthe description of the <a href="Drivers.htm">driver interface</a>. 767dd7cddfSDavid du Colombier 77*593dc095SDavid du Colombier<p>Documentation for some older, superceded devices has been moved to 78*593dc095SDavid du Colombier<a href="Deprecated.htm">another document</a>. In general such devices are deprecated 79*593dc095SDavid du Colombierand will be removed in future versions of Ghostscript. In general all older printer 80*593dc095SDavid du Colombierdrivers can be replaced by the ijs interface and one of the available 3rd party raster 81*593dc095SDavid du Colombierdriver collections. We recommend moving to the ijs device for all such printing.</p> 82*593dc095SDavid du Colombier 837dd7cddfSDavid du Colombier<!-- [1.3 end hint] ======================================================== --> 847dd7cddfSDavid du Colombier 857dd7cddfSDavid du Colombier<hr> 867dd7cddfSDavid du Colombier 877dd7cddfSDavid du Colombier<!-- [1.0 end visible header] ============================================== --> 887dd7cddfSDavid du Colombier 897dd7cddfSDavid du Colombier<!-- [2.0 begin contents] ================================================== --> 907dd7cddfSDavid du Colombier 913ff48bf5SDavid du Colombier<h2><a name="Measurements"></a>Notes on measurements</h2> 927dd7cddfSDavid du Colombier 937dd7cddfSDavid du Colombier<p> 947dd7cddfSDavid du ColombierSeveral different important kinds of measures appear throughout this 957dd7cddfSDavid du Colombierdocument: inches, centimeters and millimeters, points, and bits per pixel. 967dd7cddfSDavid du Colombier 977dd7cddfSDavid du Colombier<dl> 987dd7cddfSDavid du Colombier 99*593dc095SDavid du Colombier<dt>Centimeters and millimeters</dt> 1007dd7cddfSDavid du Colombier<dd>ISO standard paper sizes such as A4 and A3 are commonly represented in 1017dd7cddfSDavid du Colombierthe SI units of centimeters and millimeters. Centimeters are abbreviated 102*593dc095SDavid du Colombier<dfn><abbr>cm</abbr></dfn>, millimeters <dfn><abbr>mm</abbr></dfn>. ISO A4 paper is 103*593dc095SDavid du Colombierquite close to 210×297 millimeters (approximately 8.3×11.7 104*593dc095SDavid du Colombierinches).</dd> 1057dd7cddfSDavid du Colombier 106*593dc095SDavid du Colombier<dt>Inches</dt> 107*593dc095SDavid du Colombier<dd>1 inch equals 2.54 centimeters. The inch measure is sometimes 108*593dc095SDavid du Colombierrepresented by <dfn><abr>in</abr></dfn> or a quotation mark (<abr>"</abr>) to the right 109*593dc095SDavid du Colombierof a measure, like 8.5in or 8.5". 110*593dc095SDavid du ColombierU.S. "letter" paper is exactly 111*593dc095SDavid du Colombier8.5in×11in, approximately 21.6cm×27.9cm. (See in the usage 112*593dc095SDavid du Colombierdocumentation all the <a href="Use.htm#Known_paper_sizes">paper sizes 113*593dc095SDavid du Colombierpredefined in Ghostscript</a>.)</dd> 114*593dc095SDavid du Colombier 115*593dc095SDavid du Colombier<dt>Points</dt> 1167dd7cddfSDavid du Colombier<dd>Points are a measure traditionally used in the printing trade and now 1177dd7cddfSDavid du Colombierin PostScript, which specifies exactly 72 points per inch (approximately 1187dd7cddfSDavid du Colombier28.35 per centimeter). The <a href="Use.htm#Known_paper_sizes">paper sizes 1197dd7cddfSDavid du Colombierknown to Ghostscript</a> are defined in the initialization file 120*593dc095SDavid du Colombier<tt>gs_statd.ps</tt> in terms of points.</dd> 1217dd7cddfSDavid du Colombier 122*593dc095SDavid du Colombier<dt>Dots per inch</dt> 123*593dc095SDavid du Colombier<dd>Dots per inch or <dfn><abbr>dpi</abbr></dfn> is the common measure of 124*593dc095SDavid du Colombierprinting resolution in the US.</dd> 125*593dc095SDavid du Colombier 126*593dc095SDavid du Colombier<dt>Bits per pixel</dt> 127*593dc095SDavid du Colombier<dd>Commonly abbreviated <dfn><abbr>bpp</abbr></dfn> this is the number of 128*593dc095SDavid du Colombierdigital bits used to represent the color of each pixel. This is also referred 129*593dc095SDavid du Colombierto as 'bit depth' or 'pixel depth'.</dd> 130*593dc095SDavid du Colombier 1317dd7cddfSDavid du Colombier</dl> 1327dd7cddfSDavid du Colombier 1337dd7cddfSDavid du Colombier<hr> 1347dd7cddfSDavid du Colombier 135*593dc095SDavid du Colombier<h2><a name="File_formats"></a>Image file formats</h2> 136*593dc095SDavid du Colombier 137*593dc095SDavid du Colombier<p> 138*593dc095SDavid du ColombierGhostscript supports output to a variety of image file formats 139*593dc095SDavid du Colombierand is widely used for rasterizing postscript and pdf files. 140*593dc095SDavid du ColombierA collection of such formats ('output devices' in Ghostscript terminology) 141*593dc095SDavid du Colombierare described in this section. 142*593dc095SDavid du Colombier</p> 143*593dc095SDavid du Colombier 144*593dc095SDavid du Colombier<p> 145*593dc095SDavid du ColombierHere are some commonly useful driver options that apply to all raster drivers. 146*593dc095SDavid du ColombierOptions specific to particular file formats are described in their respective 147*593dc095SDavid du Colombiersections below.</p> 148*593dc095SDavid du Colombier 149*593dc095SDavid du Colombier<blockquote><dl> 150*593dc095SDavid du Colombier 151*593dc095SDavid du Colombier<dt>-sOutputFile=<em>filename</em></dt> 152*593dc095SDavid du Colombier<dd><p>This is a general option telling Ghostscript what to name the output. 153*593dc095SDavid du ColombierIt can either be a single filename '<tt>tiger.png</tt>' or a template 154*593dc095SDavid du Colombier'<tt>figure-%03d.jpg</tt>' where the <tt>%03d</tt> is replaced by the page number.</p> 155*593dc095SDavid du Colombier 156*593dc095SDavid du Colombier 157*593dc095SDavid du Colombier<dt>-r<em>res</em></dt> 158*593dc095SDavid du Colombier<dt>-r<em>xres</em>x<em>yres</em></dt> 159*593dc095SDavid du Colombier<dd><p>This option sets the resolution of the output file in dots per inch. 160*593dc095SDavid du ColombierThe default value if you don't specify this options is usually 72 <abbr>dpi</abbr>.</p></dd> 161*593dc095SDavid du Colombier 162*593dc095SDavid du Colombier<dt>-dTextAlphaBits=<em>n</em></dt> 163*593dc095SDavid du Colombier<dt>-dGraphicsAlphaBits=<em>n</em></dt> 164*593dc095SDavid du Colombier<dd><p>These options control the use of subsample antialiasing. Their use is highly recommended 165*593dc095SDavid du Colombierfor producing high quality rasterizations of the input files. The size of the subsampling 166*593dc095SDavid du Colombierbox <em>n</em> should be 4 for optimum output, but smaller values can be used for faster 167*593dc095SDavid du Colombierrendering. Antialiasing is enabled separately for text and graphics content.</p></dd> 168*593dc095SDavid du Colombier 169*593dc095SDavid du Colombier</dl></blockquote> 170*593dc095SDavid du Colombier 171*593dc095SDavid du Colombier<p> 172*593dc095SDavid du ColombierIt is also conventional to call Ghostscript with the '<tt>-dSAFER -dBATCH -dNOPAUSE</tt>' trio 173*593dc095SDavid du Colombierof options when rasterizing to a file. These suppress interactive prompts and enable some 174*593dc095SDavid du Colombiersecurity checks on the file to be run. Please see the <a href="Use.htm">Use documentation</a> 175*593dc095SDavid du Colombierfor a complete description. 176*593dc095SDavid du Colombier</p> 177*593dc095SDavid du Colombier 178*593dc095SDavid du Colombier<h3><a name="PNG"></a>PNG file format</h3> 179*593dc095SDavid du Colombier 180*593dc095SDavid du Colombier<p><acronym>PNG</acronym> (pronounced 'ping') stands for Portable Network Graphics, 181*593dc095SDavid du Colombierand is the recommended format for high-quality images. It supports full quality 182*593dc095SDavid du Colombiercolor and transparency, offers excellent lossless compression of the image data, 183*593dc095SDavid du Colombierand is widely supported. Please see the 184*593dc095SDavid du Colombier<a href="http://www.libpng.org/pub/png/pngintro.html" class="offsite">PNG website</a> 185*593dc095SDavid du Colombierfor a complete description of the format.</p> 186*593dc095SDavid du Colombier 187*593dc095SDavid du Colombier<p>Ghostscript provides a variety of devices for <acronymn>PNG output 188*593dc095SDavid du Colombiervarying by bit depth. For normal use we recommend <tt>png16m</tt> for 24-bit RGB color, 189*593dc095SDavid du Colombieror <tt>pnggray</tt> for grayscale. The png256, png16 and pngmono devices respectively 190*593dc095SDavid du Colombierprovide 8-bit color, 4-bit color and black-and-white for special needs.</p> 191*593dc095SDavid du Colombier 192*593dc095SDavid du Colombier<p>The pngalpha device is 32-bit RGBA color with transparency 193*593dc095SDavid du Colombierindicating pixel coverage. The background is transparent unless 194*593dc095SDavid du Colombierit has been explicitly filled. PDF 1.4 transparent files do not 195*593dc095SDavid du Colombiergive a transparent background with this device. Text and graphics 196*593dc095SDavid du Colombieranti-aliasing are enabled by default.</p> 197*593dc095SDavid du Colombier 198*593dc095SDavid du Colombier<h4>Options</h4> 199*593dc095SDavid du Colombier 200*593dc095SDavid du Colombier<p>The pngalpha device has one option. 201*593dc095SDavid du ColombierThe other png devices have no special options.</p> 202*593dc095SDavid du Colombier 203*593dc095SDavid du Colombier<blockquote> 204*593dc095SDavid du Colombier<dl> 205*593dc095SDavid du Colombier<dt><b><tt>-dBackgroundColor=</tt></b><b><em>16#RRGGBB</em></b> (RGB color, default white = 16#ffffff) 206*593dc095SDavid du Colombier<dd>For the <tt>pngalpha</tt> device only, 207*593dc095SDavid du Colombierset the suggested background color in the PNG bKGD chunk. 208*593dc095SDavid du ColombierWhen a program reading a PNG file does not support alpha 209*593dc095SDavid du Colombiertransparency, the PNG library converts the image using 210*593dc095SDavid du Colombiereither a background color if supplied by the program 211*593dc095SDavid du Colombieror the bKGD chunk. 212*593dc095SDavid du ColombierOne common web browser has this problem, so when using 213*593dc095SDavid du Colombier<b><tt><body bgcolor="CCCC00"></tt></b> on a web page 214*593dc095SDavid du Colombieryou would need to use <b><tt>-dBackgroundColor=16#CCCC00</tt></b> 215*593dc095SDavid du Colombierwhen creating alpha transparent PNG images for use on the 216*593dc095SDavid du Colombierpage. 217*593dc095SDavid du Colombier</dl> 218*593dc095SDavid du Colombier</blockquote> 219*593dc095SDavid du Colombier 220*593dc095SDavid du Colombier<h4>Examples</h4> 221*593dc095SDavid du Colombier 222*593dc095SDavid du Colombier<p>Examples of how to use Ghostscript to convert postscript to PNG image files: 223*593dc095SDavid du Colombier 224*593dc095SDavid du Colombier<blockquote> 225*593dc095SDavid du Colombier<pre> 226*593dc095SDavid du Colombier <kbd>gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 \ 227*593dc095SDavid du Colombier -sOutputFile=tiger.png examples/tiger.png</kbd> 228*593dc095SDavid du Colombier 229*593dc095SDavid du Colombier <kbd>gs -dSAFER -dBATCH -dNOPAUSE -r150 -sDEVICE=pnggray -dTextAlphaBits=4 \ 230*593dc095SDavid du Colombier -sOutputFile=doc-%02d.png doc.pdf</kbd> 231*593dc095SDavid du Colombier</pre> 232*593dc095SDavid du Colombier</blockquote> 233*593dc095SDavid du Colombier<p></p> 234*593dc095SDavid du Colombier 235*593dc095SDavid du Colombier<h3><a name="JFIF"></a>JPEG file format (JFIF)</h3> 236*593dc095SDavid du Colombier 237*593dc095SDavid du Colombier<p> 238*593dc095SDavid du ColombierGhostscript includes output drivers that can produce jpeg files 239*593dc095SDavid du Colombierfrom postscript or pdf images. These are the <tt>jpeg</tt> and 240*593dc095SDavid du Colombier<tt>jpeggray</tt> devices. 241*593dc095SDavid du Colombier 242*593dc095SDavid du Colombier<p>Technically these produce <a href="http://www.ijg.org/">Independent JPEG Group</a> 243*593dc095SDavid du ColombierJFIF (JPEG File Interchange Format) files, the common sort found on the web.</p> 244*593dc095SDavid du Colombier 245*593dc095SDavid du Colombier<p><strong>Please note</strong> that 246*593dc095SDavid du ColombierJPEG is a compression method specifically intended for continuous-tone 247*593dc095SDavid du Colombierimages such as photographs, not for graphics, and it is therefore quite 248*593dc095SDavid du Colombierunsuitable for the vast majority of page images produced with PostScript. 249*593dc095SDavid du ColombierFor anything other than pages containing simple images the lossy compression 250*593dc095SDavid du Colombierof the jpeg format will result in poor quality output regardless of the input. 251*593dc095SDavid du ColombierTo learn more about the distinction, consult a reference about uses and abuses of JPEG, 252*593dc095SDavid du Colombiersuch as the JPEG FAQ 253*593dc095SDavid du Colombier 254*593dc095SDavid du Colombier<blockquote> 255*593dc095SDavid du Colombier<a href="http://www.faqs.org/faqs/jpeg-faq/" class="offsite">http://www.faqs.org/faqs/jpeg-faq/</a> 256*593dc095SDavid du Colombier</blockquote> 257*593dc095SDavid du Colombier 258*593dc095SDavid du Colombier<h4>Examples</h4> 259*593dc095SDavid du Colombier 260*593dc095SDavid du Colombier<p> 261*593dc095SDavid du ColombierYou can use the JPEG output drivers -- <b><tt>jpeg</tt></b> to produce 262*593dc095SDavid du Colombiercolor JPEG files and <b><tt>jpeggray</tt></b> for grayscale JPEGs -- the 263*593dc095SDavid du Colombiersame as other file-format drivers: by specifying the device name and an 264*593dc095SDavid du Colombieroutput file name, for example 265*593dc095SDavid du Colombier 266*593dc095SDavid du Colombier<blockquote> 267*593dc095SDavid du Colombier<pre><kbd>gs -sDEVICE=jpeg -sOutputFile=foo.jpg foo.ps</kbd></pre> 268*593dc095SDavid du Colombier</blockquote> 269*593dc095SDavid du Colombier 270*593dc095SDavid du Colombier<h4>Options</h4> 271*593dc095SDavid du Colombier 272*593dc095SDavid du Colombier<p> 273*593dc095SDavid du ColombierThe JPEG devices support several special parameters to control the JPEG 274*593dc095SDavid du Colombier"quality setting" (DCT quantization level).</p> 275*593dc095SDavid du Colombier 276*593dc095SDavid du Colombier<blockquote> 277*593dc095SDavid du Colombier<dl> 278*593dc095SDavid du Colombier<dt><b><tt>-dJPEGQ=</tt></b><b><em>N</em></b> (integer from 0 to 100, default 75) 279*593dc095SDavid du Colombier<dd>Set the quality level <b><em>N</em></b> according to the widely used 280*593dc095SDavid du ColombierIJG quality scale, which balances the extent of compression against the 281*593dc095SDavid du Colombierfidelity of the image when reconstituted. Lower values drop more 282*593dc095SDavid du Colombierinformation from the image to achieve higher compression, and therefore 283*593dc095SDavid du Colombierhave lower quality when reconstituted. 284*593dc095SDavid du Colombier 285*593dc095SDavid du Colombier<dt><b><tt>-dQFactor=</tt></b><b><em>M</em></b> (float from 0.0 to 1.0) 286*593dc095SDavid du Colombier<dd>Adobe's QFactor quality scale, which you may use in place of 287*593dc095SDavid du Colombier<b><tt>JPEGQ</tt></b> above. The QFactor scale is used by PostScript's 288*593dc095SDavid du ColombierDCTEncode filter but is nearly unheard-of elsewhere. 289*593dc095SDavid du Colombier</dl> 290*593dc095SDavid du Colombier</blockquote> 291*593dc095SDavid du Colombier 292*593dc095SDavid du Colombier<p> 293*593dc095SDavid du ColombierAt this writing the default JPEG quality level of 75 is equivalent to 294*593dc095SDavid du Colombier<b><tt>-dQFactor=0.5</tt></b>, but the JPEG default might change in the 295*593dc095SDavid du Colombierfuture. There is currently no support for any additional JPEG 296*593dc095SDavid du Colombiercompression options, such as the other DCTEncode filter parameters. 297*593dc095SDavid du Colombier</p> 298*593dc095SDavid du Colombier 299*593dc095SDavid du Colombier 300*593dc095SDavid du Colombier<h3><a name="PNM"></a>PNM</h3> 301*593dc095SDavid du Colombier 302*593dc095SDavid du Colombier<p>The PNM (portable network map) family of formats are very simple 303*593dc095SDavid du Colombieruncompressed image formats commonly used on unix-like systems. They 304*593dc095SDavid du Colombierare particularly useful for testing or as input to an external conversion 305*593dc095SDavid du Colombierutility.</p> 306*593dc095SDavid du Colombier 307*593dc095SDavid du Colombier<p>A wide variety of data formats and depths is supported. Devices include 308*593dc095SDavid du Colombier<tt>pbm 309*593dc095SDavid du Colombier pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw pkm pkmraw pksm 310*593dc095SDavid du Colombier pksmraw</tt>. 311*593dc095SDavid du Colombier</p> 312*593dc095SDavid du Colombier 313*593dc095SDavid du Colombier<h3><a name="TIFF"></a>TIFF file formats</h3> 314*593dc095SDavid du Colombier 315*593dc095SDavid du Colombier<p><acronym>TIFF</acronym> is a loose collection of formats, now largely 316*593dc095SDavid du Colombiersuperceded by <acronym>PNG</acronym> except in applications where backward 317*593dc095SDavid du Colombiercompatibility or special compression is required. The <acronym>TIFF</acronym> 318*593dc095SDavid du Colombierfile format is described in the 319*593dc095SDavid du Colombier<a href="http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf" class="offsite">TIFF 6.0 Specification</a> 320*593dc095SDavid du Colombierpublished by Adobe Systems Incorporated.</p> 321*593dc095SDavid du Colombier 322*593dc095SDavid du Colombier<p> 323*593dc095SDavid du ColombierThere are two unrelated sets of TIFF drivers. There are five color TIFF 324*593dc095SDavid du Colombierdrivers that produce uncompressed output: 325*593dc095SDavid du Colombier 326*593dc095SDavid du Colombier<blockquote> 327*593dc095SDavid du Colombier<dl> 328*593dc095SDavid du Colombier<dt><b><tt>tiffgray</tt></b> 329*593dc095SDavid du Colombier<dd>Produces 8-bit gray output. 330*593dc095SDavid du Colombier<dt><b><tt>tiff12nc</tt></b> 331*593dc095SDavid du Colombier<dd>Produces 12-bit RGB output (4 bits per component). 332*593dc095SDavid du Colombier<dt><b><tt>tiff24nc</tt></b> 333*593dc095SDavid du Colombier<dd>Produces 24-bit RGB output (8 bits per component). 334*593dc095SDavid du Colombier<dt><b><tt>tiff32nc</tt></b> 335*593dc095SDavid du Colombier<dd>Produces 32-bit CMYK output (8 bits per component). 336*593dc095SDavid du Colombier<dt><b><tt>tiffsep</tt></b> 337*593dc095SDavid du Colombier<dd> 338*593dc095SDavid du ColombierThe tiffsep device creates multiple output files. The device creates a single 339*593dc095SDavid du Colombier32 bit composite CMYK file (tiff32nc format) and multiple tiffgray files. 340*593dc095SDavid du ColombierA tiffgray file is created for each separation. 341*593dc095SDavid du Colombier 342*593dc095SDavid du Colombier<p> 343*593dc095SDavid du ColombierThe file specified via the OutputFile command line parameter will contain 344*593dc095SDavid du ColombierCMYK data. This data is based upon the CMYK data within the file plus 345*593dc095SDavid du Colombieran equivalent CMYK color for each spot colors which is present. The equivalent 346*593dc095SDavid du ColombierCMYK color for each spot colors is determined using the alternate tint transform 347*593dc095SDavid du Colombierfunction specified in Separation and DeviceN color spaces. Since 348*593dc095SDavid du Colombierthis file is created based upon having color planes for each colorant, the 349*593dc095SDavid du Colombierfile will correctly represent the appearance of overprinting with spot colors. 350*593dc095SDavid du Colombier 351*593dc095SDavid du Colombier<p> 352*593dc095SDavid du ColombierFile names for the separations for the 353*593dc095SDavid du ColombierCMYK colorants are created by appending '.Cyan.tif', '.Magenta.tif' 354*593dc095SDavid du Colombier'.Yellow.tif' or '.Black.tif' to the to the end of the file name 355*593dc095SDavid du Colombierspecified via the OutputFile parameter. File names for the spot 356*593dc095SDavid du Colombiercolor separation files are created by appending '.sn.tif' (where n 357*593dc095SDavid du Colombieris the spot color number, see below) to the end of the file name specified via 358*593dc095SDavid du Colombierthe OutputFile parameter. 359*593dc095SDavid du Colombier 360*593dc095SDavid du Colombier<p> 361*593dc095SDavid du ColombierInternally each spot color is assigned a spot color number. These 362*593dc095SDavid du Colombiernumbers start with 0 for the first spot color. The spot color 363*593dc095SDavid du Colombiernumbers are assigned in the same order as the names are printed to 364*593dc095SDavid du Colombierstderr (see below). This order also matches the ordering in the 365*593dc095SDavid du ColombierSeparationColorNames list, if this parameter is specified. The 366*593dc095SDavid du Colombierspot color numbers are not affected by the SeparationOrder parameter. 367*593dc095SDavid du Colombier 368*593dc095SDavid du Colombier<p> 369*593dc095SDavid du ColombierThe names of spot colors may be specified via the SeparationColorNames device 370*593dc095SDavid du Colombierparameters. Or the tiffsep device will automatically recognize spot color 371*593dc095SDavid du Colombiernames if <b><tt>-dMaxSeparations=8</tt></b> is specified on the 372*593dc095SDavid du Colombiercommand line. 373*593dc095SDavid du Colombier 374*593dc095SDavid du Colombier<p> 375*593dc095SDavid du ColombierIf only a subset of the colorants for a file is desired then the separations 376*593dc095SDavid du Colombierto be output can be selected via the SeparationOrder 377*593dc095SDavid du Colombierdevice parameter. When colorants are selected via the 378*593dc095SDavid du ColombierSeparationOrder parameter, the composite CMYK output contains 379*593dc095SDavid du Colombierthe equivalent CMYK data only for the selected colorants. 380*593dc095SDavid du Colombier 381*593dc095SDavid du Colombier<p> 382*593dc095SDavid du ColombierThe tiffsep device also prints the names of any spot colors 383*593dc095SDavid du Colombierdetected within a document to stderr. (stderr is also use for the 384*593dc095SDavid du Colombieroutput from the bbox device.) For each spot color the name of 385*593dc095SDavid du Colombierthe color is printed preceded by '%%SeparationName: '. This 386*593dc095SDavid du Colombierprovides a simple mechanism for users and external applications to be informed about 387*593dc095SDavid du Colombierthe names of spot colors with a document. 388*593dc095SDavid du Colombier 389*593dc095SDavid du Colombier<p> 390*593dc095SDavid du ColombierGhostscript currently limits the size of a pixel to 64 bits. 391*593dc095SDavid du ColombierSince the tiffsep device uses 8 bits per colorant, the device can handle 392*593dc095SDavid du Colombiera maximum of 8 colorants per pass. However it is possible to 393*593dc095SDavid du Colombierhandle more than 8 colorants by doing multiple passes. For each 394*593dc095SDavid du Colombierpass after the first one, the names of all of the separations need 395*593dc095SDavid du Colombierto be specified via the SeparationColorNames parameter and the 396*593dc095SDavid du Colombiernames of the desired separations need to be specified via the 397*593dc095SDavid du ColombierSeparationOrder parameter. It is 398*593dc095SDavid du Colombierpossible to create an overall CMYK composite for more than 8 399*593dc095SDavid du Colombiercolorants by then adding together (via an external application like 400*593dc095SDavid du Colombierimagemagick) the composite CMYK output files from the individual 401*593dc095SDavid du ColombierGhostscript passes. 402*593dc095SDavid du Colombier</dl> 403*593dc095SDavid du Colombier</blockquote> 404*593dc095SDavid du Colombier 405*593dc095SDavid du Colombier<p> 406*593dc095SDavid du ColombierThe remaining TIFF drivers all produce black-and-white output with different 407*593dc095SDavid du Colombiercompression modes: 408*593dc095SDavid du Colombier 409*593dc095SDavid du Colombier<blockquote> 410*593dc095SDavid du Colombier<dl> 411*593dc095SDavid du Colombier<dt><b><tt>tiffcrle</tt></b> 412*593dc095SDavid du Colombier<dd>G3 fax encoding with no EOLs 413*593dc095SDavid du Colombier<dt><b><tt>tiffg3</tt></b> 414*593dc095SDavid du Colombier<dd>G3 fax encoding with EOLs 415*593dc095SDavid du Colombier<dt><b><tt>tiffg32d</tt></b> 416*593dc095SDavid du Colombier<dd>2-D G3 fax encoding 417*593dc095SDavid du Colombier<dt><b><tt>tiffg4</tt></b> 418*593dc095SDavid du Colombier<dd>G4 fax encoding 419*593dc095SDavid du Colombier<dt><b><tt>tifflzw</tt></b> 420*593dc095SDavid du Colombier<dd>LZW-compatible (tag = 5) compression 421*593dc095SDavid du Colombier<dt><b><tt>tiffpack</tt></b> 422*593dc095SDavid du Colombier<dd>PackBits (tag = 32773) compression 423*593dc095SDavid du Colombier</dl> 424*593dc095SDavid du Colombier</blockquote> 425*593dc095SDavid du Colombier 426*593dc095SDavid du Colombier 427*593dc095SDavid du Colombier<h4>Options</h4> 428*593dc095SDavid du Colombier 429*593dc095SDavid du Colombier<p> 430*593dc095SDavid du ColombierThe black-and-white TIFF drivers support creation of files that are 431*593dc095SDavid du Colombiercomprised of more than a single strip. Multi-strip files reduce the memory 432*593dc095SDavid du Colombierrequirement on the reader, since readers need only store and process one 433*593dc095SDavid du Colombierstrip at a time. These drivers provide two parameters beyond the standard 434*593dc095SDavid du Colombierset: 435*593dc095SDavid du Colombier 436*593dc095SDavid du Colombier<blockquote> 437*593dc095SDavid du Colombier<dl> 438*593dc095SDavid du Colombier<dt><b><tt>-dMaxStripSize=</tt><em>N</em></b> (non-negative integer; default = 0) 439*593dc095SDavid du Colombier<dd>Set the maximum (uncompressed) size of a strip. 440*593dc095SDavid du Colombier 441*593dc095SDavid du Colombier<dt><b><tt>-dAdjustWidth</tt><em>state</em></b> (0 or 1; default = 1) 442*593dc095SDavid du Colombier<dd>If this option set then if the requested page width is close to either A4 (1728 columns) or B4 (2048 columns), set the page width to A4 or B4 respectively. 443*593dc095SDavid du ColombierThis behavior is the default. Pass -dAdjustWidth=0 to turn off this behavior. 444*593dc095SDavid du Colombier</dl></blockquote> 445*593dc095SDavid du Colombier 446*593dc095SDavid du Colombier<p> 447*593dc095SDavid du ColombierThe TIFF 6.0 specification, Section 7, page 27, recommends that the size of 448*593dc095SDavid du Colombiereach strip be about 8 Kbytes. As an example, to generate the 'tiger' in 449*593dc095SDavid du Colombiertiffg4 format that has the recommended strip size, use: 450*593dc095SDavid du Colombier 451*593dc095SDavid du Colombier<blockquote><pre> 452*593dc095SDavid du Colombiergs -sDEVICE=tiffg4 -sOutputFile=tiger.tiff -dMaxStripSize=8192 examples/tiger.eps 453*593dc095SDavid du Colombier</pre></blockquote> 454*593dc095SDavid du Colombier 455*593dc095SDavid du Colombier<p> 456*593dc095SDavid du ColombierIf the value of the <tt>MaxStripSize</tt> parameter is smaller than a 457*593dc095SDavid du Colombiersingle image row, then no error will be generated, and the TIFF file will be 458*593dc095SDavid du Colombiergenerated correctly using one row per strip. Note that smaller strip sizes 459*593dc095SDavid du Colombierincrease the size of the file by increasing the size of the StripOffsets and 460*593dc095SDavid du ColombierStripByteCounts tables, and by reducing the effectiveness of the compression 461*593dc095SDavid du Colombierwhich must start over for each strip. 462*593dc095SDavid du Colombier 463*593dc095SDavid du Colombier<p> 464*593dc095SDavid du ColombierIf the value of MaxStripSize is 0 (the default), then the entire image will 465*593dc095SDavid du Colombierbe a single strip. 466*593dc095SDavid du Colombier 467*593dc095SDavid du Colombier<p> 468*593dc095SDavid du ColombierSince v. 8.51 the logical order of bits within a byte, FillOrder, tag = 266 is 469*593dc095SDavid du Colombiercontrolled by a parameter: 470*593dc095SDavid du Colombier 471*593dc095SDavid du Colombier<blockquote> 472*593dc095SDavid du Colombier<dl> 473*593dc095SDavid du Colombier<dt><b><tt>-dFillOrder=</tt><em>1 | 2 </em></b> (default = 1) 474*593dc095SDavid du Colombier<dd>If this option set to 2 then pixels are arranged within a byte such that pixels 475*593dc095SDavid du Colombierwith lower column values are stored in the lower-order bits of the byte; otherwise 476*593dc095SDavid du Colombierpixels are arranged in reverse order. 477*593dc095SDavid du Colombier</dl></blockquote> 478*593dc095SDavid du Colombier 479*593dc095SDavid du ColombierEarlier versions of Ghostscript always generated TIFF files with FillOrder = 2. 480*593dc095SDavid du ColombierAccording to the TIFF 6.0 specification, Section 8, page 32, support of 481*593dc095SDavid du ColombierFillOrder = 2 is not required in a Baseline TIFF compliant reader 482*593dc095SDavid du Colombier 483*593dc095SDavid du Colombier<h3><a name="fax"></a>FAX</h3> 484*593dc095SDavid du Colombier 485*593dc095SDavid du Colombier<p> 486*593dc095SDavid du ColombierGhostscript supports a variety of fax encodings, both encapsulated in 487*593dc095SDavid du Colombier<acronym>TIFF</acronym> (see above) and as raw files. The later case is 488*593dc095SDavid du Colombierdescribed here. 489*593dc095SDavid du Colombier</p> 490*593dc095SDavid du Colombier 491*593dc095SDavid du Colombier<p> 492*593dc095SDavid du ColombierThe fax devices are <tt>faxg3</tt>, <tt>faxg32d</tt> and <tt>faxg4</tt>. 493*593dc095SDavid du Colombier</p> 494*593dc095SDavid du Colombier 495*593dc095SDavid du Colombier<h3><a name="BMP"></a>BMP</h3> 496*593dc095SDavid du Colombier 497*593dc095SDavid du Colombier<p> 498*593dc095SDavid du ColombierBMP is a simple uncompressed image format commonly used on MS Windows. 499*593dc095SDavid du ColombierIt is supported by the devices <tt>bmpmono bmpgray bmpsep1 500*593dc095SDavid du Colombier bmpsep8 bmp16 bmp256 bmp16m bmp32b</tt>. 501*593dc095SDavid du Colombier</p> 502*593dc095SDavid du Colombier 503*593dc095SDavid du Colombier<h3><a name="PCX"></a>PCX</h3> 504*593dc095SDavid du Colombier 505*593dc095SDavid du Colombier<p> 506*593dc095SDavid du ColombierPCX is an image format sometimes used on MS Windows. It has some support 507*593dc095SDavid du Colombierfor image compression and alternate color spaces, and so can be a useful 508*593dc095SDavid du Colombierway to output CMYK. 509*593dc095SDavid du ColombierIt is supported by the <tt>pcxmono pcxgray pcx16 pcx256 pcx24b pcxcmyk</tt> 510*593dc095SDavid du Colombierseries of devices. 511*593dc095SDavid du Colombier</p> 512*593dc095SDavid du Colombier 513*593dc095SDavid du Colombier<h3><a name="PSD"></a>PSD</h3> 514*593dc095SDavid du Colombier 515*593dc095SDavid du Colombier<p> 516*593dc095SDavid du ColombierPSD is the image format used by Adobe Photoshop. 517*593dc095SDavid du ColombierIt is supported by the <tt>psdcmyk</tt> and <tt>psdrgb</tt> devices. 518*593dc095SDavid du ColombierOf special interest with the <tt>psdcmyk</tt> device is that it supports spot 519*593dc095SDavid du Colombiercolors. The names of the spot colors 520*593dc095SDavid du Colombiermust be specified prior to opening a page. This can be done via adding the 521*593dc095SDavid du Colombierfollowing to the command line: <b><tt>-c "<< /SeparationColorNames [ /Name1 /Name2 ] 522*593dc095SDavid du Colombier>> setpagedevice" -f</tt></b>. The <tt>psdcmyk</tt> device will support up to four 523*593dc095SDavid du Colombierspot colors. 524*593dc095SDavid du ColombierTo view the results properly, a color needs to be assigned to each of 525*593dc095SDavid du Colombierthe spot color planes within Photoshop. (Ghostscript assigns black as 526*593dc095SDavid du Colombierthe default color for all spot colors in the psdcmyk device.) 527*593dc095SDavid du Colombier 528*593dc095SDavid du Colombier 529*593dc095SDavid du Colombier 530*593dc095SDavid du Colombier</p> 531*593dc095SDavid du Colombier 532*593dc095SDavid du Colombier<h2><a name="High-level"></a>High-level devices</h2> 533*593dc095SDavid du Colombier 534*593dc095SDavid du Colombier<p> 535*593dc095SDavid du ColombierIn addition to raster image files, Ghostscript supports output in a number 536*593dc095SDavid du Colombierof 'high-level' formats. These allow Ghostscript to preserve (as much as 537*593dc095SDavid du Colombierpossible) the drawing elements of the input file maintaining flexibility, 538*593dc095SDavid du Colombierresolution independence, and editability.</p> 539*593dc095SDavid du Colombier 540*593dc095SDavid du Colombier<h3><a name="PDF"></a>PDF writer</h3> 541*593dc095SDavid du Colombier 542*593dc095SDavid du Colombier<p>The <tt>pdfwrite</tt> device outputs PDF. Please refer to 543*593dc095SDavid du Colombier<a href="Ps2pdf.htm">Ps2pdf.htm</a> for the extensive <tt>pdfwrite</tt> 544*593dc095SDavid du Colombierdevice options.</p> 545*593dc095SDavid du Colombier 546*593dc095SDavid du Colombier<h3><a name="PS"></a>PS writer</h3> 547*593dc095SDavid du Colombier 548*593dc095SDavid du Colombier<p>The <tt>pswrite</tt> device outputs postscript.</p> 549*593dc095SDavid du Colombier 550*593dc095SDavid du Colombier<h4>Options</h4> 551*593dc095SDavid du Colombier 552*593dc095SDavid du Colombier<blockquote> 553*593dc095SDavid du Colombier<dl> 554*593dc095SDavid du Colombier<dt><b><tt>-dLanguageLevel=</tt><em>1 | 1.5 | 2 | 3</em></b> (default is 2) 555*593dc095SDavid du Colombier<dd>Set the language level of the generated file. 556*593dc095SDavid du ColombierLanguage level 1.5 is language level 1 with color extensions. 557*593dc095SDavid du ColombierCurrently language level 3 generates the same PostScript as 2. 558*593dc095SDavid du Colombier</dl></blockquote> 559*593dc095SDavid du Colombier 560*593dc095SDavid du Colombier<h3><a name="EPS"></a>EPS writer</h3> 561*593dc095SDavid du Colombier 562*593dc095SDavid du Colombier<p>The <tt>epswrite</tt> device outputs encapsulated postscript.</p> 563*593dc095SDavid du Colombier 564*593dc095SDavid du Colombier<h4>Options</h4> 565*593dc095SDavid du Colombier 566*593dc095SDavid du Colombier<blockquote> 567*593dc095SDavid du Colombier<dl> 568*593dc095SDavid du Colombier<dt><b><tt>-dLanguageLevel=</tt><em>1 | 1.5 | 2 | 3</em></b> (default is 2) 569*593dc095SDavid du Colombier<dd>Set the language level of the generated file. 570*593dc095SDavid du ColombierLanguage level 1.5 is language level 1 with color extensions. 571*593dc095SDavid du ColombierCurrently language level 3 generates the same PostScript as 2. 572*593dc095SDavid du Colombier</dl></blockquote> 573*593dc095SDavid du Colombier 574*593dc095SDavid du Colombier<h3><a name="PXL"></a>PXL</h3> 575*593dc095SDavid du Colombier 576*593dc095SDavid du Colombier<p>The <tt>pxlmono</tt> and <tt>pxlcolor</tt> devices output HP PCL-XL, 577*593dc095SDavid du Colombiera graphic language understood by many recent laser printers. 578*593dc095SDavid du Colombier 579*593dc095SDavid du Colombier<p> 580*593dc095SDavid du Colombier 581*593dc095SDavid du Colombier<hr> 582*593dc095SDavid du Colombier 583*593dc095SDavid du Colombier<h2><a name="Display_devices"></a>Display Devices</h2> 584*593dc095SDavid du Colombier 585*593dc095SDavid du Colombier<p> 586*593dc095SDavid du ColombierGhostscript is often used for screen display of postscript and pdf documents. 587*593dc095SDavid du ColombierIn many cases, a client or 'viewer' application calls the Ghostscript engine 588*593dc095SDavid du Colombierto do the rasterization and handles the display of the resulting image itself, 589*593dc095SDavid du Colombierbut it is also possible to invoke Ghostscript directly and select an output 590*593dc095SDavid du Colombierdevice which directly handles displaying the image on screen. 591*593dc095SDavid du Colombier 592*593dc095SDavid du Colombier<p> 593*593dc095SDavid du ColombierThis section describes the various display-oriented devices that are available 594*593dc095SDavid du Colombierin Ghostscript. 595*593dc095SDavid du Colombier 596*593dc095SDavid du Colombier<h3><a name="x11_devices"></a>X Window System</h3> 597*593dc095SDavid du Colombier 598*593dc095SDavid du Colombier<p> 599*593dc095SDavid du ColombierPerhaps the most common use of of a display device is with the X Window System 600*593dc095SDavid du Colombieron unix-like systems. It is the default device on the command line client on 601*593dc095SDavid du Colombiersuch systems, and is used more creatively by the gv client application. 602*593dc095SDavid du Colombier 603*593dc095SDavid du Colombier<p> 604*593dc095SDavid du ColombierThe available devices are: 605*593dc095SDavid du Colombier 606*593dc095SDavid du Colombier<dl> 607*593dc095SDavid du Colombier<dt><b>x11</b> 608*593dc095SDavid du Colombier<dd>This is the default device, handling display on X11R6. 609*593dc095SDavid du Colombier 610*593dc095SDavid du Colombier<dt><b>x11alpha</b> 611*593dc095SDavid du Colombier<dd>This is the x11 device, but with antialiasing. It is equivalent to 612*593dc095SDavid du Colombierinvoking the x11 device with the options <tt>-dGraphicsAlphaBits=4 613*593dc095SDavid du Colombier-dTextAlphaBits=4 -dMaxBitmap=50000000</tt>. 614*593dc095SDavid du Colombier 615*593dc095SDavid du Colombier<dt><b>x11cmyk</b> 616*593dc095SDavid du Colombier<dd>This device rasterizes the image in the CMYK color space, then flattens 617*593dc095SDavid du Colombierit to RGB for display. It's intended for testing only. 618*593dc095SDavid du Colombier 619*593dc095SDavid du Colombier<dt><b>x11mono</b> 620*593dc095SDavid du Colombier<dd>This is a strict black-and-white device for 1-bit monochrome displays. 621*593dc095SDavid du Colombier 622*593dc095SDavid du Colombier<dt><b>x11gray2</b> 623*593dc095SDavid du Colombier<dd>This is a device for 2 bpp (4-level) monochrome displays. 624*593dc095SDavid du Colombier 625*593dc095SDavid du Colombier<dt><b>x11gray4</b> 626*593dc095SDavid du Colombier<dd>This is a device for 4 bpp (16-level) monochrome displays. 627*593dc095SDavid du Colombier</dl> 628*593dc095SDavid du Colombier 629*593dc095SDavid du Colombier<h3><a name="display_device"></a>display device (MS Windows, OS/2, gtk+)</h3> 630*593dc095SDavid du Colombier<p> 631*593dc095SDavid du ColombierThe <b><tt>display</tt></b> device is used by the MS Windows, 632*593dc095SDavid du ColombierOS/2 and the gtk+ versions of ghostscript. 633*593dc095SDavid du Colombier</p> 634*593dc095SDavid du Colombier 635*593dc095SDavid du Colombier<h4>Options</h4> 636*593dc095SDavid du Colombier 637*593dc095SDavid du Colombier<p>The display device has several user settable options.</p> 638*593dc095SDavid du Colombier 639*593dc095SDavid du Colombier<blockquote> 640*593dc095SDavid du Colombier<dl> 641*593dc095SDavid du Colombier<dt><b><tt>-dDisplayFormat=</tt></b><b><em>N</em></b> (integer bit-field) 642*593dc095SDavid du Colombier<dd>Some common values are 16#30804 for Windows RGB, 16#804 for gtk+ RGB, 643*593dc095SDavid du Colombier16#20101 for Windows monochrome, 16#102 for gtk+ monochrome, 644*593dc095SDavid du Colombier16#20802 grayscale, 16#20808 for CMYK, 16#a0800 for separations. 645*593dc095SDavid du ColombierThe bit fields are 646*593dc095SDavid du Colombier<ul> 647*593dc095SDavid du Colombier<li> native (1), gray (2), RGB (4), CMYK (8), or separation (80000) 648*593dc095SDavid du Colombier color spaces. 649*593dc095SDavid du Colombier<li> unused first byte (40) or last byte (80). 650*593dc095SDavid du Colombier<li> 1 (100), 4 (400), or 8 (800) bits/component. 651*593dc095SDavid du Colombier<li> bigendian (00000 = RGB) or littleendian (10000 = BGR) order. 652*593dc095SDavid du Colombier<li> top first (20000) or bottom first (00000) raster. 653*593dc095SDavid du Colombier<li> 16 bits/pixel with 555 (00000) or 565 (40000) bitfields. 654*593dc095SDavid du Colombier</ul> 655*593dc095SDavid du ColombierFor more details, see the <a href="API.htm#display">Ghostscript 656*593dc095SDavid du ColombierInterpreter API.</a> 657*593dc095SDavid du Colombier<dt><b><tt>-dDisplayResolution=</tt></b><b><em>DPI</em></b> 658*593dc095SDavid du Colombier<dd>Set the initial resolution resolution for the display device. 659*593dc095SDavid du ColombierThis is used by the Windows clients to set the display device 660*593dc095SDavid du Colombierresolution to the Windows display logical resolution. 661*593dc095SDavid du ColombierThis can be overriden by the command line option 662*593dc095SDavid du Colombier<b><tt>-r</tt><em>DPI</em></b>. 663*593dc095SDavid du Colombier</dl> 664*593dc095SDavid du Colombier 665*593dc095SDavid du Colombier</blockquote> 666*593dc095SDavid du Colombier 667*593dc095SDavid du ColombierWhen using the separation color space, the following options may be set 668*593dc095SDavid du Colombierusing setpagedevice, as described in the PostScript Language Reference: 669*593dc095SDavid du Colombier 670*593dc095SDavid du Colombier<blockquote> 671*593dc095SDavid du Colombier<dl> 672*593dc095SDavid du Colombier<dt><b><tt>SeparationColorNames</tt></b> 673*593dc095SDavid du Colombier<dd>An array giving the names of the spot colors 674*593dc095SDavid du Colombier 675*593dc095SDavid du Colombier<dt><b><tt>SeparationOrder</tt></b> 676*593dc095SDavid du Colombier<dd>An array giving the names and order of the colorants 677*593dc095SDavid du Colombierto be output. 678*593dc095SDavid du Colombier</dl> 679*593dc095SDavid du Colombier</blockquote> 680*593dc095SDavid du Colombier 681*593dc095SDavid du Colombier 682*593dc095SDavid du Colombier<hr> 683*593dc095SDavid du Colombier 6843ff48bf5SDavid du Colombier<h2><a name="IJS"></a>IJS - Inkjet and other raster devices</h2> 6857dd7cddfSDavid du Colombier 6863ff48bf5SDavid du Colombier<p> 6873ff48bf5SDavid du ColombierIJS is a relatively new initiative to improve the quality and ease of 6883ff48bf5SDavid du Colombieruse of inkjet printing with Ghostscript. Using IJS, you can add new 6893ff48bf5SDavid du Colombierdrivers, or upgrade existing ones, without recompiling Ghostscript. 6903ff48bf5SDavid du ColombierAll driver authors are encouraged to adapt their drivers for IJS, and 6913ff48bf5SDavid du Colombierif there is an IJS driver available for your printer, it should be 6923ff48bf5SDavid du Colombieryour first choice. 6933ff48bf5SDavid du Colombier</p> 6943ff48bf5SDavid du Colombier 6953ff48bf5SDavid du Colombier<p>Please see the <a href="http://www.linuxprinting.org/ijs/">IJS web 6963ff48bf5SDavid du Colombierpage</a> for more information about IJS, including a listing of 6973ff48bf5SDavid du ColombierIJS-compatible drivers. 6983ff48bf5SDavid du Colombier</p> 6993ff48bf5SDavid du Colombier 7003ff48bf5SDavid du Colombier<p> 7013ff48bf5SDavid du ColombierA typical command line for IJS is: 7023ff48bf5SDavid du Colombier</p> 7033ff48bf5SDavid du Colombier 7043ff48bf5SDavid du Colombier<blockquote> 7053ff48bf5SDavid du Colombier<b><tt> 706*593dc095SDavid du Colombiergs -dSAFER -sDEVICE=ijs -sIjsServer=hpijs 7073ff48bf5SDavid du Colombier -sDeviceManufacturer=HEWLETT-PACKARD -sDeviceModel='DESKJET 990' 708*593dc095SDavid du Colombier -dIjsUseOutputFD -sOutputFile=/dev/usb/lp1 -dNOPAUSE -- 7093ff48bf5SDavid du Colombier examples/tiger.eps 7103ff48bf5SDavid du Colombier</tt></b> 7113ff48bf5SDavid du Colombier</blockquote> 7123ff48bf5SDavid du Colombier 7133ff48bf5SDavid du Colombier 7143ff48bf5SDavid du Colombier<p> 7153ff48bf5SDavid du ColombierIndividual IJS command line parameters are as follows: 7163ff48bf5SDavid du Colombier</p> 7173ff48bf5SDavid du Colombier 7183ff48bf5SDavid du Colombier<dl> 7193ff48bf5SDavid du Colombier<dt><b><tt>-sIjsServer=</tt></b><em>{path}</em> 7203ff48bf5SDavid du Colombier<dd>Sets the pathname for the IJS server (ie printer driver). 7213ff48bf5SDavid du ColombierGhostscript will spawn a new process for this driver, and communicate 7223ff48bf5SDavid du Colombierwith it using the IJS protocol. The pathname need not be absolute, 7233ff48bf5SDavid du Colombieras the PATH environment variable is searched, but it's probably a good 7243ff48bf5SDavid du Colombieridea for robustness and security. Note also that if -dSAFER is not 7253ff48bf5SDavid du Colombierspecified, it's possible for PostScript code to set this parameter, 7263ff48bf5SDavid du Colombierso it can cause arbitrary code to be executed. See the section on <a 7273ff48bf5SDavid du Colombierhref="Use.htm#Security">Security</a> for more information. 7283ff48bf5SDavid du Colombier</dl> 7293ff48bf5SDavid du Colombier 7303ff48bf5SDavid du Colombier<dl> 7313ff48bf5SDavid du Colombier<dt><b><tt>-sDeviceManufacturer=</tt></b><em>{name}</em> 7323ff48bf5SDavid du Colombier<dt><b><tt>-sDeviceModel=</tt></b><em>{name}</em> 7333ff48bf5SDavid du Colombier<dd>These parameters select the device according to IEEE-1284 standard 7343ff48bf5SDavid du Colombierdevice ID strings. In general, consult the documentation for the 7353ff48bf5SDavid du Colombierdriver to find the appropriate settings. Note that, if the value 7363ff48bf5SDavid du Colombiercontains a space, you'll want to quote the value in your shell, as 7373ff48bf5SDavid du Colombierin the example above. 7383ff48bf5SDavid du Colombier</dl> 7393ff48bf5SDavid du Colombier 7403ff48bf5SDavid du Colombier<dl> 7413ff48bf5SDavid du Colombier<dt><b><tt>-sIjsParams=</tt></b><em>{params}</em> 7423ff48bf5SDavid du Colombier<dd>This parameter allows you to set arbitrary IJS parameters on 7433ff48bf5SDavid du Colombierthe IJS driver. The format is a comma-separated list of 7443ff48bf5SDavid du Colombier<b><tt>key=value</tt></b> pairs. If it is necessary to send a 7453ff48bf5SDavid du Colombiervalue containing a comma or backslash, it can be escaped with 7463ff48bf5SDavid du Colombiera backslash. Thus, <b><tt>'-sIjsParams=Foo=bar,Baz=a\,b'</tt></b> sets 7473ff48bf5SDavid du Colombierthe parameter Foo to "bar", and Baz to "a,b". 7483ff48bf5SDavid du Colombier</dl> 7493ff48bf5SDavid du Colombier 7503ff48bf5SDavid du Colombier<dl> 7513ff48bf5SDavid du Colombier<dt><b><tt>-dIjsUseOutputFD</tt></b> 7523ff48bf5SDavid du Colombier<dd>This flag indicates that Ghostscript should open the output file 7533ff48bf5SDavid du Colombierand pass a file descriptor to the server. If not set, Ghostscript 7543ff48bf5SDavid du Colombiersimply passes the filename set in OutputFile to the server. In most 7553ff48bf5SDavid du Colombiercases, this flag won't matter, but if you have a driver which works 7563ff48bf5SDavid du Colombieronly with OutputFD (such as hpijs 1.0.2), or if you're using the 7573ff48bf5SDavid du Colombier-sOutputFile="|cmd" syntax, you'll need to set it. 7583ff48bf5SDavid du Colombier</dl> 7593ff48bf5SDavid du Colombier 7603ff48bf5SDavid du Colombier<dl> 7613ff48bf5SDavid du Colombier<dt><b><tt>-dBitsPerSample=</tt></b><em>N</em> 7623ff48bf5SDavid du Colombier<dd>This parameter controls the number of bits per sample. The 7633ff48bf5SDavid du Colombierdefault value of 8 should be appropriate for most work. For monochrome 7643ff48bf5SDavid du Colombierimages, use -dBitsPerSample=1. 7653ff48bf5SDavid du Colombier</dl> 7663ff48bf5SDavid du Colombier 7673ff48bf5SDavid du Colombier<p>Generic Ghostscript options that are particularly relevant for IJS 7683ff48bf5SDavid du Colombierare summarized below: 7693ff48bf5SDavid du Colombier</p> 7703ff48bf5SDavid du Colombier 7713ff48bf5SDavid du Colombier<dl> 7723ff48bf5SDavid du Colombier<dt><b><tt>-r</tt></b><em>number</em> 7733ff48bf5SDavid du Colombier<br><b><tt>-r</tt></b><em>number1</em><b><tt>x</tt></b><em>number2</em> 7743ff48bf5SDavid du Colombier<dd>Sets the resolution, in dpi. If the resolution is not specified, 7753ff48bf5SDavid du ColombierGhostscript queries the IJS server to determine the preferred resolution. 7763ff48bf5SDavid du ColombierWhen the resolution is specified, it overrides the value (if any) 7773ff48bf5SDavid du Colombierpreferred by the IJS server. 7783ff48bf5SDavid du Colombier</dl> 7793ff48bf5SDavid du Colombier 7803ff48bf5SDavid du Colombier<dl> 7813ff48bf5SDavid du Colombier<dt><b><tt>-dDuplex</tt></b> 7823ff48bf5SDavid du Colombier<dt><b><tt>-dTumble</tt></b> 7833ff48bf5SDavid du Colombier<dd>These flags enable duplex (two-sided) printing. Tumble controls 7843ff48bf5SDavid du Colombierthe orientation. When Tumble is false, the pages 7853ff48bf5SDavid du Colombierare oriented suitably at the left or right. When Tumble is true, 7863ff48bf5SDavid du Colombierthe pages are oriented suitably for binding at the top or 7873ff48bf5SDavid du Colombierbottom. 7883ff48bf5SDavid du Colombier</dl> 7893ff48bf5SDavid du Colombier 7903ff48bf5SDavid du Colombier<dl> 7913ff48bf5SDavid du Colombier<dt><b><tt>-sProcessColorModel=</tt></b><em>{name}</em> 7923ff48bf5SDavid du Colombier<dd>Use this flag to select the process color model. Suitable values 7933ff48bf5SDavid du Colombierinclude DeviceGray, DeviceRGB, and DeviceCMYK. 7943ff48bf5SDavid du Colombier</dl> 7953ff48bf5SDavid du Colombier 7963ff48bf5SDavid du Colombier<h3>Building IJS</h3> 7973ff48bf5SDavid du Colombier 7983ff48bf5SDavid du Colombier<p> IJS is included by default on Unix gcc builds, and also in 7993ff48bf5SDavid du Colombierautoconf'ed builds. Others may need some makefile tweaking. First, 8003ff48bf5SDavid du Colombiermake sure the IJS device is selected: 8013ff48bf5SDavid du Colombier 8023ff48bf5SDavid du Colombier<blockquote> 8033ff48bf5SDavid du ColombierDEVICE_DEVS2=$(DD)ijs.dev 8043ff48bf5SDavid du Colombier</blockquote> 8053ff48bf5SDavid du Colombier 8063ff48bf5SDavid du Colombier<p> Next, make sure that the path and execution type are set in 8073ff48bf5SDavid du Colombierthe top level makefile. The values for Unix are as follows: 8083ff48bf5SDavid du Colombier 8093ff48bf5SDavid du Colombier<blockquote> 8103ff48bf5SDavid du ColombierIJSSRCDIR=ijs 8113ff48bf5SDavid du ColombierIJSEXECTYPE=unix 8123ff48bf5SDavid du Colombier</blockquote> 8133ff48bf5SDavid du Colombier 8143ff48bf5SDavid du Colombier<p> At present, "unix" and "win" are the only supported values for 8153ff48bf5SDavid du ColombierIJSEXECTYPE. If neither sounds appropriate for your system, it's 8163ff48bf5SDavid du Colombierpossible that more porting work is needed. 8173ff48bf5SDavid du Colombier 8183ff48bf5SDavid du Colombier<p> Last, make sure that ijs.mak is included in the top level makefile. 8193ff48bf5SDavid du ColombierIt should be present right after the include of icclib.mak. 8203ff48bf5SDavid du Colombier 8213ff48bf5SDavid du Colombier<p> IJS is not inherently platform-specific. We're very much interested 8223ff48bf5SDavid du Colombierin taking patches from people who have ported it to non-mainstream 8233ff48bf5SDavid du Colombierplatforms. And once it's built, you won't have to recompile Ghostscript 8243ff48bf5SDavid du Colombierto support new drivers! 8253ff48bf5SDavid du Colombier 826*593dc095SDavid du Colombier<h2><a name="Rinkj"></a>Rinkj - Resplendent inkjet driver</h2> 827*593dc095SDavid du Colombier 828*593dc095SDavid du Colombier<p>The Rinkj driver is an experimental new driver, capable of driving 829*593dc095SDavid du Colombiersome Epson printers at a very high level of quality. It is not 830*593dc095SDavid du Colombiercurrently recommended for the faint of heart.</p> 831*593dc095SDavid du Colombier 832*593dc095SDavid du Colombier<p>You will need to add the following line to your makefile: 833*593dc095SDavid du Colombier 834*593dc095SDavid du Colombier<blockquote> 835*593dc095SDavid du ColombierDEVICE_DEVS2=$(DD)rinkj.dev 836*593dc095SDavid du Colombier</blockquote> 837*593dc095SDavid du Colombier 838*593dc095SDavid du Colombier<p>Most of the configuration parameters, including resolution, choice 839*593dc095SDavid du Colombierof printer model, and linearization curves, are in a separate setup 840*593dc095SDavid du Colombierfile. In addition, we rely heavily on an ICC profile for mapping 841*593dc095SDavid du Colombierdocument colors to actual device colors.</p> 842*593dc095SDavid du Colombier 843*593dc095SDavid du Colombier<p>A typical command line invocation is:</p> 844*593dc095SDavid du Colombier 845*593dc095SDavid du Colombier<blockquote><tt> 846*593dc095SDavid du Colombiergs -r1440x720 -sDEVICE=rinkj -sOutputFile=/dev/usb/lp0 847*593dc095SDavid du Colombier -sSetupFile=lib/rinkj-2200-setup -sProfileOut=2200-cmyk.icm 848*593dc095SDavid du Colombier -dNOPAUSE -dBATCH file.ps 849*593dc095SDavid du Colombier</tt></blockquote> 850*593dc095SDavid du Colombier 851*593dc095SDavid du Colombier<p> 852*593dc095SDavid du ColombierIndividual Rinkj command line parameters are as follows: 853*593dc095SDavid du Colombier</p> 854*593dc095SDavid du Colombier 855*593dc095SDavid du Colombier<dl> 856*593dc095SDavid du Colombier<dt><b><tt>-sSetupFile=</tt></b><em>{path}</em> 857*593dc095SDavid du Colombier<dd>Specifies the path for the setup file. 858*593dc095SDavid du Colombier 859*593dc095SDavid du Colombier<dt><b><tt>-sProfileOut=</tt></b><em>{path}</em> 860*593dc095SDavid du Colombier<dd>Specifies the path for the output ICC profile. This profile should 861*593dc095SDavid du Colombierbe a <i>link</i> profile, mapping the ProcessColorModel (DeviceCMYK by 862*593dc095SDavid du Colombierdefault) to the device color space. 863*593dc095SDavid du Colombier</dl> 864*593dc095SDavid du Colombier 865*593dc095SDavid du Colombier<p>For 6- and 7-color devices, the target color space for the output 866*593dc095SDavid du Colombierprofile is currently a 4-component space. The conversion from this 867*593dc095SDavid du Colombierinto the 6- or 7-color space (the "ink split") is done by lookup 868*593dc095SDavid du Colombiertables in the setup file.</p> 869*593dc095SDavid du Colombier 870*593dc095SDavid du Colombier<p>Setup files are in a simple "Key: value" text format. Relevant keys 871*593dc095SDavid du Colombierare:</p> 872*593dc095SDavid du Colombier 873*593dc095SDavid du Colombier<dl> 874*593dc095SDavid du Colombier<dt><b><tt>Manufacturer:</tt></b><em>{name}</em> 875*593dc095SDavid du Colombier<dt><b><tt>Model:</tt></b><em>{name}</em> 876*593dc095SDavid du Colombier<dd>The manufacturer and model of the individual device, using the 877*593dc095SDavid du Colombiersame syntax as IEEE printer identification strings. Currently, the 878*593dc095SDavid du Colombieronly supported manufacturer string is "EPSON", and the only supported 879*593dc095SDavid du Colombiermodel strings are "Stylus Photo 2200" and "Stylus Photo 7600". 880*593dc095SDavid du Colombier 881*593dc095SDavid du Colombier<dt><b><tt>Resolution:</tt></b><em>{x-dpi}</em>x<em>{y-dpi}</em> 882*593dc095SDavid du Colombier<dd>The resolution in dpi. Usually, this should match the 883*593dc095SDavid du ColombierGhostscript resolution set with the <tt>-r</tt> switch. Otherwise, 884*593dc095SDavid du Colombierthe page image will be scaled. 885*593dc095SDavid du Colombier 886*593dc095SDavid du Colombier<dt><b><tt>Dither:</tt></b><em>{int}</em> 887*593dc095SDavid du Colombier<dd>Selects among variant dither options. Currently, the choices are 888*593dc095SDavid du Colombier<tt>1</tt> for one-bit dither, and <tt>2</tt>, for a 2-bit variable 889*593dc095SDavid du Colombierdot dither. 890*593dc095SDavid du Colombier 891*593dc095SDavid du Colombier<dt><b><tt>Aspect:</tt></b><em>{int}</em> 892*593dc095SDavid du Colombier<dd>Controls the aspect ratio for highlight dot placement. Valid 893*593dc095SDavid du Colombiervalues are <tt>1</tt>, <tt>2</tt>, and <tt>4</tt>. For best results, 894*593dc095SDavid du Colombierchoose a value near the x resolution divided by the y resolution. For 895*593dc095SDavid du Colombierexample, if resolution is 1440x720, aspect should be 2. 896*593dc095SDavid du Colombier 897*593dc095SDavid du Colombier<dt><b><tt>Microdot:</tt></b><em>{int}</em> 898*593dc095SDavid du Colombier<dd>Chooses a microdot size. On EPSON devices, this value is passed 899*593dc095SDavid du Colombierdirectly through to the "ESC ( e" command. See EPSON documentation 900*593dc095SDavid du Colombierfor further details (see, I <em>told</em> you this wasn't for the 901*593dc095SDavid du Colombierfaint of heart). 902*593dc095SDavid du Colombier 903*593dc095SDavid du Colombier<dt><b><tt>Unidirectional:</tt></b><em>{int}</em> 904*593dc095SDavid du Colombier<dd>Enables (1) or disables (0) unidirectional printing, which is 905*593dc095SDavid du Colombierslower but possibly higher quality. 906*593dc095SDavid du Colombier 907*593dc095SDavid du Colombier<dt><b><tt>AddLut:</tt></b><em>{plane}</em> 908*593dc095SDavid du Colombier<dd>Adds a linearization look-up table. The plane is one of 909*593dc095SDavid du Colombier"CcMmYKk". The lookup table data follows. The line immediately 910*593dc095SDavid du Colombierfollowing AddLut is the number of data points. Then, for each data 911*593dc095SDavid du Colombierpoint is a line consisting of two space-separated floats - the output 912*593dc095SDavid du Colombiervalue and the input value. If more than one LUT is specified for a 913*593dc095SDavid du Colombiersingle plane, they are applied in sequence. 914*593dc095SDavid du Colombier</dl> 915*593dc095SDavid du Colombier 916*593dc095SDavid du Colombier<p>A typical setup file is supplied in <tt>lib/rinkj-2200-setup</tt>. 917*593dc095SDavid du ColombierIt is configured for the 2200, but can be adapted to the 7600 just by 918*593dc095SDavid du Colombierchanging the "Model" line. 919*593dc095SDavid du Colombier 920*593dc095SDavid du Colombier<p>In addition, sample profiles are available at <a href="http://artofcode.com/rinkj/profiles/">artofcode.com/rinkj/profiles/</a>. 921*593dc095SDavid du Colombier 922*593dc095SDavid du Colombier<p>A known issue with this driver is poor support for margins and 923*593dc095SDavid du Colombierpage size. In some cases, this will cause an additional page to be 924*593dc095SDavid du Colombierejected at the end of a job. You may be able to work around this by 925*593dc095SDavid du Colombiersupplying a cut-down value for <tt>-dDEVICEHEIGHTPOINTS</tt>, for 926*593dc095SDavid du Colombierexample 755 for an 8.5x11 inch page on the EPSON 2200.</p> 927*593dc095SDavid du Colombier 928*593dc095SDavid du Colombier<h2><a name="HP_ijs"></a>HP Deskjet official drivers</h2> 929*593dc095SDavid du Colombier 930*593dc095SDavid du Colombier<p> 931*593dc095SDavid du ColombierHP provides official drivers for many of their Deskjet printer models. 932*593dc095SDavid du ColombierIn order to use these drivers, you will need the HP Inkjet Server as 933*593dc095SDavid du Colombierwell as Ghostscript, available from <a 934*593dc095SDavid du Colombierhref="http://hpinkjet.sourceforge.net">http://hpinkjet.sourceforge.net</a>. 935*593dc095SDavid du ColombierThis version of Ghostscript includes the patch from version 0.97 of 936*593dc095SDavid du Colombierthe hpijs software. If you are installing hpijs from an RPM, you will 937*593dc095SDavid du Colombieronly need the hpijs RPM, not the Ghostscript-hpijs one, as the code 938*593dc095SDavid du Colombierneeded to work with hpijs is already included. 939*593dc095SDavid du Colombier 940*593dc095SDavid du Colombier<p> 941*593dc095SDavid du ColombierNote that newer version of the hpijs drivers support the IJS protocol. 942*593dc095SDavid du ColombierIf you can, you should consider using the ijs driver instead. Among 943*593dc095SDavid du Colombierother things, the hpijs Ghostscript driver is Unix-only, and is untested 944*593dc095SDavid du Colombieron older Unix platforms. 945*593dc095SDavid du Colombier 946*593dc095SDavid du Colombier<p> 947*593dc095SDavid du ColombierAs of the 0.97 version, hpijs supports the following printer models: 948*593dc095SDavid du Colombier 949*593dc095SDavid du Colombier<dl><dt><b>e-Series:</b> 950*593dc095SDavid du Colombier <dd>e-20 951*593dc095SDavid du Colombier<dt><b>DeskJet 350C Series:</b> 952*593dc095SDavid du Colombier <dd>350C 953*593dc095SDavid du Colombier<dt><b>DeskJet 600C Series:</b> 954*593dc095SDavid du Colombier <dd>600C, 660C, 670/672C, 670TV, 680/682C 955*593dc095SDavid du Colombier<dt><b>DeskJet 600C Series Photo:</b> 956*593dc095SDavid du Colombier <dd>610/612C, 640/648C, 690/692/693/694/695/697C 957*593dc095SDavid du Colombier<dt><b>DeskJet 630C Series:</b> 958*593dc095SDavid du Colombier <dd>630/632C 959*593dc095SDavid du Colombier<dt><b>DeskJet 800C Series:</b> 960*593dc095SDavid du Colombier <dd>810/812C, 830/832C, 840/842/843C, 880/882C, 895C 961*593dc095SDavid du Colombier<dt><b>DeskJet 900C Series, PhotoSmart::</b> 962*593dc095SDavid du Colombier <dd>930/932C, 950/952C, 970C, PhotoSmart 1000/1100 963*593dc095SDavid du Colombier<dt><b>DeskJet 990C, PhotoSmart:</b> 964*593dc095SDavid du Colombier <dd>960C, 980C, 990C, PhotoSmart 1215/1218 965*593dc095SDavid du Colombier 966*593dc095SDavid du Colombier</dl> 967*593dc095SDavid du Colombier 968*593dc095SDavid du Colombier<p>You will need to add the following line to your makefile: 969*593dc095SDavid du Colombier 970*593dc095SDavid du Colombier<blockquote> 971*593dc095SDavid du ColombierDEVICE_DEVS2=$(DD)DJ630.dev $(DD)DJ6xx.dev $(DD)DJ6xxP.dev $(DD)DJ8xx.dev $(DD)DJ9xx.dev $(DD)DJ9xxVIP.dev $(DD)AP21xx.dev 972*593dc095SDavid du Colombier</blockquote> 973*593dc095SDavid du Colombier 974*593dc095SDavid du Colombier<p> 975*593dc095SDavid du ColombierPlease see <a 976*593dc095SDavid du Colombierhref="http://hpinkjet.sourceforge.net">http://hpinkjet.sourceforge.net</a> 977*593dc095SDavid du Colombierfor more information about this driver. Thanks to the folks at HP, 978*593dc095SDavid du Colombierespecially David Suffield for making this driver available and working to 979*593dc095SDavid du Colombierintegrate it with Ghostscript. 980*593dc095SDavid du Colombier</p> 981*593dc095SDavid du Colombier 982*593dc095SDavid du Colombier<h2><a name="gimp-print"></a>Gimp-Print driver collection</h2> 983*593dc095SDavid du Colombier 984*593dc095SDavid du Colombier<p> 985*593dc095SDavid du ColombierThe Gimp-Print project provides a large collection of printer drivers 986*593dc095SDavid du Colombierwith an IJS interface. Please see their 987*593dc095SDavid du Colombier<a href="http://gimp-print.sourceforge.net/" class="offsite">website</a> 988*593dc095SDavid du Colombierfor details. 989*593dc095SDavid du Colombier</p> 990*593dc095SDavid du Colombier 991*593dc095SDavid du Colombier<hr> 9923ff48bf5SDavid du Colombier<h2><a name="Win"></a>MS Windows printers</h2> 9939a747e4fSDavid du Colombier 9947dd7cddfSDavid du Colombier<p> 9957dd7cddfSDavid du ColombierThis section was written by Russell Lang, the author of Ghostscript's 9967dd7cddfSDavid du ColombierMS Windows-specific printer driver, and updated by 9977dd7cddfSDavid du Colombier<a href="mailto:Pierre.Arnaud@opac.ch">Pierre Arnaud</a>, 9987dd7cddfSDavid du Colombierthe current maintainer. 9997dd7cddfSDavid du Colombier</p> 10007dd7cddfSDavid du Colombier 10017dd7cddfSDavid du Colombier<p> 10027dd7cddfSDavid du ColombierThe <b><tt>mswinpr2</tt></b> device uses MS Windows printer drivers, and 10037dd7cddfSDavid du Colombierthus should work with any printer with device-independent bitmap (DIB) 10047dd7cddfSDavid du Colombierraster capabilities. The printer resolution cannot be selected directly 10057dd7cddfSDavid du Colombierusing PostScript commands from Ghostscript: use the printer setup in the 10067dd7cddfSDavid du ColombierControl Panel instead. It is however possible to specify a maximum resolution 10077dd7cddfSDavid du Colombierfor the printed document (see below). 10087dd7cddfSDavid du Colombier</p> 10097dd7cddfSDavid du Colombier 10107dd7cddfSDavid du Colombier<p> 10117dd7cddfSDavid du ColombierIf no Windows printer name is specified in <b><tt>-sOutputFile</tt></b>, 10127dd7cddfSDavid du ColombierGhostscript prompts for a Windows printer using the standard Print Setup 10137dd7cddfSDavid du Colombierdialog box. You must set the orientation to Portrait and the page size to 10147dd7cddfSDavid du Colombierthat expected by Ghostscript; otherwise the image will be clipped. 10157dd7cddfSDavid du ColombierGhostscript sets the physical device size to that of the Windows printer 10167dd7cddfSDavid du Colombierdriver, but it does not update the PostScript clipping path. 10177dd7cddfSDavid du Colombier</p> 10187dd7cddfSDavid du Colombier 10197dd7cddfSDavid du Colombier<p> 10207dd7cddfSDavid du ColombierIf a Windows printer name is specified in <b><tt>-sOutputFile</tt></b> using 1021*593dc095SDavid du Colombierthe format <tt>"%printer%printer_name"</tt>, for instance 10227dd7cddfSDavid du Colombier</p> 10237dd7cddfSDavid du Colombier 10247dd7cddfSDavid du Colombier<blockquote><b><tt> 1025*593dc095SDavid du Colombiergs ... -sOutputFile="%printer%Apple LaserWriter II NT" 10267dd7cddfSDavid du Colombier</tt></b></blockquote> 10277dd7cddfSDavid du Colombier 10287dd7cddfSDavid du Colombier<p> 10297dd7cddfSDavid du Colombierthen Ghostscript attempts to open the Windows printer without prompting 10307dd7cddfSDavid du Colombier(except, of course, if the printer is connected to <b><tt>FILE:</tt></b>). 10317dd7cddfSDavid du ColombierGhostscript attempts to set the Windows printer page size and orientation 10327dd7cddfSDavid du Colombierto match that expected by Ghostscript, but doesn't always succeed. It uses 10337dd7cddfSDavid du Colombierthis algorithm: 10347dd7cddfSDavid du Colombier</p> 10357dd7cddfSDavid du Colombier 10367dd7cddfSDavid du Colombier<ol> 10377dd7cddfSDavid du Colombier<li>If the requested page size matches one of the Windows standard page 10387dd7cddfSDavid du Colombiersizes +/- 2mm, request that standard size.</li> 10397dd7cddfSDavid du Colombier 10407dd7cddfSDavid du Colombier<li>Otherwise if the requested page size matches one of the Windows 10417dd7cddfSDavid du Colombierstandard page sizes in landscape mode, ask for that standard size in 10427dd7cddfSDavid du Colombierlandscape.</li> 10437dd7cddfSDavid du Colombier 10447dd7cddfSDavid du Colombier<li>Otherwise ask for the page size by specifying only its dimensions.</li> 10457dd7cddfSDavid du Colombier 10467dd7cddfSDavid du Colombier<li>Merge the requests above with the defaults. If the printer driver 10477dd7cddfSDavid du Colombierignores the requested paper size, no error is generated: it will print on 10487dd7cddfSDavid du Colombierthe wrong paper size.</li> 10497dd7cddfSDavid du Colombier 10507dd7cddfSDavid du Colombier<li>Open the Windows printer with the merged orientation and size.</li> 10517dd7cddfSDavid du Colombier</ol> 10527dd7cddfSDavid du Colombier 10537dd7cddfSDavid du Colombier<p> 10547dd7cddfSDavid du ColombierThe Ghostscript physical device size is updated to match the Windows 10557dd7cddfSDavid du Colombierprinter physical device. 10567dd7cddfSDavid du Colombier</p> 10577dd7cddfSDavid du Colombier 10583ff48bf5SDavid du Colombier<h3><a name="Win_properties"></a>Supported command-line parameters</h3> 10597dd7cddfSDavid du Colombier 10607dd7cddfSDavid du Colombier<p> 10617dd7cddfSDavid du ColombierThe <b><tt>mswinpr2</tt></b> device supports a limited number of command-line 10627dd7cddfSDavid du Colombierparameters (e.g. it does not support setting the printer resolution). The 10637dd7cddfSDavid du Colombierrecognized parameters are the following: 10647dd7cddfSDavid du Colombier</p> 10657dd7cddfSDavid du Colombier 10667dd7cddfSDavid du Colombier<blockquote> 10677dd7cddfSDavid du Colombier<dl> 10687dd7cddfSDavid du Colombier<dt><b><tt>-sDEVICE=mswinpr2</tt></b></dt> 10697dd7cddfSDavid du Colombier<dd>Selects the MS Windows printer device. If Ghostscript was not 10707dd7cddfSDavid du Colombiercompiled with this device as the default output device, you have to specify 10717dd7cddfSDavid du Colombierit on the command line.</dd> 10727dd7cddfSDavid du Colombier 10737dd7cddfSDavid du Colombier<dt><b><tt>-dNoCancel</tt></b></dt> 10747dd7cddfSDavid du Colombier<dd>Hides the progress dialog, which shows the percent of the document page 10757dd7cddfSDavid du Colombieralready processed and also provides a <em>cancel</em> button. This option 10767dd7cddfSDavid du Colombieris useful if GS is intended to print pages in the background, without any 10777dd7cddfSDavid du Colombieruser intervention.</dd> 10787dd7cddfSDavid du Colombier 1079*593dc095SDavid du Colombier<dt><b><tt>-sOutputFile=</tt></b><b>"%printer%<em>printer_name</em>"</b></dt> 10807dd7cddfSDavid du Colombier<dd>Specifies which printer should be used. The <em>printer_name</em> should be 10817dd7cddfSDavid du Colombiertyped exactly as it appears in the Printers control panel, including spaces.</dd> 10827dd7cddfSDavid du Colombier 10837dd7cddfSDavid du Colombier</dl> 10847dd7cddfSDavid du Colombier</blockquote> 10857dd7cddfSDavid du Colombier 10863ff48bf5SDavid du Colombier<h3><a name="Win_options"></a>Supported options (device properties)</h3> 10877dd7cddfSDavid du Colombier 10887dd7cddfSDavid du Colombier<p> 10897dd7cddfSDavid du ColombierSeveral extra options exist which cannot be set through the command-line, 10907dd7cddfSDavid du Colombierbut only by executing the appropriate PostScript setup code. These options 10917dd7cddfSDavid du Colombiercan be set through the inclusion of a setup file on the command-line: 10927dd7cddfSDavid du Colombier</p> 10937dd7cddfSDavid du Colombier 10947dd7cddfSDavid du Colombier<blockquote><b><tt> 10957dd7cddfSDavid du Colombiergs ... setup.ps ... 10967dd7cddfSDavid du Colombier</tt></b></blockquote> 10977dd7cddfSDavid du Colombier 10987dd7cddfSDavid du Colombier<p> 10997dd7cddfSDavid du ColombierThe <tt>setup.ps</tt> file is responsible for the device selection, therefore 11007dd7cddfSDavid du Colombieryou should not specify the <b><tt>-sDEVICE=mswinpr2</tt></b> option on the 11017dd7cddfSDavid du Colombiercommand-line if you are using such a setup file. Here is an example of such 11027dd7cddfSDavid du Colombiera setup file: 11037dd7cddfSDavid du Colombier</p> 11047dd7cddfSDavid du Colombier 11057dd7cddfSDavid du Colombier<blockquote><pre> 11067dd7cddfSDavid du Colombiermark 11077dd7cddfSDavid du Colombier /NoCancel true % don't show the cancel dialog 11087dd7cddfSDavid du Colombier /BitsPerPixel 4 % force 4 bits/pixel 11097dd7cddfSDavid du Colombier /UserSettings 11107dd7cddfSDavid du Colombier << 11117dd7cddfSDavid du Colombier /DocumentName (Ghostscript document) % name for the Windows spooler 11127dd7cddfSDavid du Colombier /MaxResolution 360 % maximum document resolution 11137dd7cddfSDavid du Colombier >> 11147dd7cddfSDavid du Colombier (mswinpr2) finddevice % select the Windows device driver 11157dd7cddfSDavid du Colombier putdeviceprops 11167dd7cddfSDavid du Colombiersetdevice 11177dd7cddfSDavid du Colombier</pre></blockquote> 11187dd7cddfSDavid du Colombier 11197dd7cddfSDavid du Colombier<p> 11207dd7cddfSDavid du ColombierThis example disables the progress dialog (same as the <tt><b>-dNoCancel</b></tt> 11217dd7cddfSDavid du Colombieroption), forces a 4 bits/pixel output resolution and specifies additional user 11227dd7cddfSDavid du Colombiersettings, such as the document name (which will be displayed by the Windows 11237dd7cddfSDavid du Colombierspooler for the queued document) and the maximum resolution (here 360 dpi). 11247dd7cddfSDavid du ColombierIt then finds and selects an instance of the MS Windows device printer 11257dd7cddfSDavid du Colombierand activates it. This will show the standard printer dialog, since no 11267dd7cddfSDavid du Colombier<tt><b>/OutputFile</b></tt> property was specified. 11277dd7cddfSDavid du Colombier</p> 11287dd7cddfSDavid du Colombier 11297dd7cddfSDavid du Colombier<p> 11307dd7cddfSDavid du ColombierThe following options are available: 11317dd7cddfSDavid du Colombier</p> 11327dd7cddfSDavid du Colombier 11337dd7cddfSDavid du Colombier<blockquote> 11347dd7cddfSDavid du Colombier<dl> 11353ff48bf5SDavid du Colombier<dt><b><tt>/NoCancel <em>boolean</em></tt></b></dt> 11367dd7cddfSDavid du Colombier<dd>Disables (hides) the progress dialog when set to <em><tt>true</tt></em> or 11373ff48bf5SDavid du Colombiershow the progress dialog if not set or set to <em><tt>false</tt></em>.</dd> 11387dd7cddfSDavid du Colombier 11393ff48bf5SDavid du Colombier<dt><b><tt>/OutputFile <em>string</em></tt></b></dt> 11407dd7cddfSDavid du Colombier<dd>Specifies which printer should be used. The string should be of the form 1141*593dc095SDavid du Colombier<tt><b>%printer%<em>printer_name</em></b></tt>, where the <em>printer_name</em> should be 11423ff48bf5SDavid du Colombiertyped exactly as it appears in the Printers control panel, including spaces.</dd> 11437dd7cddfSDavid du Colombier 11443ff48bf5SDavid du Colombier<dt><b><tt>/QueryUser <em>integer</em></tt></b></dt> 11457dd7cddfSDavid du Colombier<dd>Shows the standard printer dialog (<tt><b>1</b></tt> or any other value), 11467dd7cddfSDavid du Colombiershows the <em>printer setup dialog</em> (<tt><b>2</b></tt>) or selects the 11473ff48bf5SDavid du Colombier<em>default Windows printer</em> without any user interaction (<tt><b>3</b></tt>).</dd> 11487dd7cddfSDavid du Colombier 11493ff48bf5SDavid du Colombier<dt><b><tt>/BitsPerPixel <em>integer</em></tt></b></dt> 11507dd7cddfSDavid du Colombier<dd>Sets the device depth to the specified bits per pixel. Currently supported 11517dd7cddfSDavid du Colombiervalues are <tt><b>1</b></tt> (monochrome), <tt><b>4</b></tt> (CMYK with screening 11527dd7cddfSDavid du Colombierhandled by Ghostscript) and <tt><b>24</b></tt> (True Color, dithering handled by 11533ff48bf5SDavid du Colombierthe Windows printer driver; this option can produce huge print jobs).</dd> 11547dd7cddfSDavid du Colombier 11553ff48bf5SDavid du Colombier<dt><b><tt>/UserSettings <em>dict</em></tt></b></dt> 11567dd7cddfSDavid du Colombier<dd>Sets additional options, defined in a dictionary. The following properties can 11573ff48bf5SDavid du Colombierbe set: 11587dd7cddfSDavid du Colombier 11597dd7cddfSDavid du Colombier<dl> 11603ff48bf5SDavid du Colombier<dt><b><tt>/DocumentName <em>string</em></tt></b></dt> 11617dd7cddfSDavid du Colombier<dd>Defines the user friendly document name which will be displayed by the 11623ff48bf5SDavid du ColombierWindows spooler.</dd> 11637dd7cddfSDavid du Colombier 11643ff48bf5SDavid du Colombier<dt><b><tt>/DocumentRange <em>[n1 n2]</em></tt></b></dt> 11657dd7cddfSDavid du Colombier<dd>Defines the range of pages contained in the document. This information can 11663ff48bf5SDavid du Colombierbe used by the printer dialog, in conjunction with the following property.</dd> 11677dd7cddfSDavid du Colombier 11683ff48bf5SDavid du Colombier<dt><b><tt>/SelectedRange <em>[n1 n2]</em></tt></b></dt> 11697dd7cddfSDavid du Colombier<dd>Defines the selected range of pages. This information will be displayed in 11707dd7cddfSDavid du Colombierthe printer dialog and will be updated after the user interaction. A PostScript 11713ff48bf5SDavid du Colombierprogram could check these values and print only the selected page range.</dd> 11727dd7cddfSDavid du Colombier 11733ff48bf5SDavid du Colombier<dt><b><tt>/MaxResolution <em>dpi</em></tt></b></dt> 11747dd7cddfSDavid du Colombier<dd>Specifies the maximum tolerated output resolution. If the selected printer has 11757dd7cddfSDavid du Colombiera higher resolution than <tt><b>dpi</b></tt>, then Ghostscript will render the 11767dd7cddfSDavid du Colombierdocument with a submultiple of the printer resolution. For example, if 11777dd7cddfSDavid du Colombier<tt><b>MaxResolution</b></tt> is set to 360 and the output printer supports 11787dd7cddfSDavid du Colombierup to 1200 dpi, then Ghostscript renders the document with an internal 11797dd7cddfSDavid du Colombierresolution of 1200/4=300 dpi. This can be very useful to reduce the memory 11807dd7cddfSDavid du Colombierrequirements when printing in True Color on some high resolution ink-jet color 11813ff48bf5SDavid du Colombierprinters.</dd> 11827dd7cddfSDavid du Colombier 11833ff48bf5SDavid du Colombier</dl></dd> 11847dd7cddfSDavid du Colombier 11857dd7cddfSDavid du Colombier</dl> 11867dd7cddfSDavid du Colombier</blockquote> 11877dd7cddfSDavid du Colombier 11887dd7cddfSDavid du Colombier<p> 11897dd7cddfSDavid du ColombierThese properties can be queried through the <tt><b>currentpagedevice</b></tt> 11907dd7cddfSDavid du Colombieroperator. The following PostScript code snippet shows how to do it for some 11917dd7cddfSDavid du Colombierof the properties: 11927dd7cddfSDavid du Colombier</p> 11937dd7cddfSDavid du Colombier 11947dd7cddfSDavid du Colombier<blockquote><pre> 11957dd7cddfSDavid du Colombiercurrentpagedevice /BitsPerPixel get == % displays the selected depth 11967dd7cddfSDavid du Colombier 11977dd7cddfSDavid du Colombiercurrentpagedevice /UserSettings get % get the additional options.. 11987dd7cddfSDavid du Colombier/us exch def % ..and assign them to a variable 11997dd7cddfSDavid du Colombier 12007dd7cddfSDavid du Colombierus /DocumentName get == % displays the document name 12017dd7cddfSDavid du Colombierus /SelectedRange get == % displays the selected page range 12027dd7cddfSDavid du Colombier 1203*593dc095SDavid du Colombier% other misc. information (don't rely on them) 12047dd7cddfSDavid du Colombier 12057dd7cddfSDavid du Colombierus /Color get == % 1 => monochrome output, 2 => color output 12067dd7cddfSDavid du Colombierus /PrintCopies get == % displays the number of copies requested 12077dd7cddfSDavid du Colombier</pre></blockquote> 12087dd7cddfSDavid du Colombier 12097dd7cddfSDavid du Colombier<p> 1210*593dc095SDavid du ColombierThere are a few undocumented parameters stored in the <tt><b>UserSettings</b></tt> 12117dd7cddfSDavid du Colombierdictionary. You should not rely on them. Their use is still experimental and 12127dd7cddfSDavid du Colombierthey could be removed in a future version. 12137dd7cddfSDavid du Colombier</p> 12147dd7cddfSDavid du Colombier 12153ff48bf5SDavid du Colombier<h3><a name="Win_duplex"></a>Duplex printing</h3> 12167dd7cddfSDavid du Colombier 12177dd7cddfSDavid du Colombier<p> 12187dd7cddfSDavid du ColombierIf the Windows printer supports the duplex printing feature, then it will 12197dd7cddfSDavid du Colombieralso be available through the <b><tt>mswinpr2</tt></b> device. You can query 1220*593dc095SDavid du Colombierfor this support through the <b><tt>/Duplex</tt></b> property of the 12217dd7cddfSDavid du Colombier<b><tt>currentpagedevice</tt></b>. If it returns <b><tt>null</tt></b>, then 12227dd7cddfSDavid du Colombierthe feature is not supported by the selected printer. Otherwise, <b><tt>true</tt></b> 12237dd7cddfSDavid du Colombiermeans that the printer is currently set up to print on both faces of the paper 12247dd7cddfSDavid du Colombierand <b><tt>false</tt></b> that it is not, but that it can. 12257dd7cddfSDavid du Colombier</p> 12267dd7cddfSDavid du Colombier 12277dd7cddfSDavid du Colombier<p> 12287dd7cddfSDavid du ColombierThe following example shows how to print on both faces of the paper (using 12297dd7cddfSDavid du Colombierthe long side of the paper as the reference): 12307dd7cddfSDavid du Colombier</p> 12317dd7cddfSDavid du Colombier 12327dd7cddfSDavid du Colombier<blockquote><pre> 12337dd7cddfSDavid du Colombier<< /Duplex true /Tumble false >> setpagedevice 12347dd7cddfSDavid du Colombier</pre></blockquote> 12357dd7cddfSDavid du Colombier 12367dd7cddfSDavid du Colombier<p> 12377dd7cddfSDavid du Colombier</p> 12387dd7cddfSDavid du Colombier 12393ff48bf5SDavid du Colombier 12407dd7cddfSDavid du Colombier<hr> 12417dd7cddfSDavid du Colombier 12423ff48bf5SDavid du Colombier<h2><a name="SPARCprinter"></a>Sun SPARCprinter</h2> 12437dd7cddfSDavid du Colombier 12447dd7cddfSDavid du Colombier<p> 12457dd7cddfSDavid du ColombierThis section was contributed by Martin Schulte. 12467dd7cddfSDavid du Colombier 12477dd7cddfSDavid du Colombier<p> 12487dd7cddfSDavid du ColombierWith a SPARCprinter you always buy software that enables you to do 12497dd7cddfSDavid du ColombierPostScript printing on it. A page image is composed on the host, which 12507dd7cddfSDavid du Colombiersends a bitmap to the SPARCprinter through a special SBUS video interface. 12517dd7cddfSDavid du ColombierSo the need for a Ghostscript interface to the SPARCPrinter seems low, but 12527dd7cddfSDavid du Colombieron the other hand, Sun's software prints some PostScript drawings 12537dd7cddfSDavid du Colombierincorrectly: some pages contain a thin vertical line of rubbish, and on 12547dd7cddfSDavid du Colombiersome Mathematica drawings the text at the axes isn't rotated. Ghostscript, 12557dd7cddfSDavid du Colombierhowever, gives the correct results. Moreover, replacing proprietary 12567dd7cddfSDavid du Colombiersoftware should never be a bad idea. 12577dd7cddfSDavid du Colombier 12587dd7cddfSDavid du Colombier<p> 12597dd7cddfSDavid du ColombierThe problem is that there has yet been no effort to make the SPARCPrinter 12607dd7cddfSDavid du Colombierdriver behave like a BSD output filter. I made my tests using the script 12617dd7cddfSDavid du Colombiershown here. 12627dd7cddfSDavid du Colombier 12633ff48bf5SDavid du Colombier<h3><a name="SPARC_install"></a>Installation</h3> 12647dd7cddfSDavid du Colombier 12657dd7cddfSDavid du Colombier<p> 12667dd7cddfSDavid du ColombierAdd <b><tt>sparc.dev</tt></b> to <b><tt>DEVICE_DEVS</tt></b> and compile 12677dd7cddfSDavid du ColombierGhostscript as described in the documentation on <a href="Make.htm">how to 12687dd7cddfSDavid du Colombierbuild Ghostscript</a>. Afterwards you can use the following script as an 12697dd7cddfSDavid du Colombierexample for printing after modifying it with the right pathnames -- 12707dd7cddfSDavid du Colombierincluding for <b>{GSPATH}</b> the full pathname of the Ghostscript 12717dd7cddfSDavid du Colombierexecutable: 12727dd7cddfSDavid du Colombier 12737dd7cddfSDavid du Colombier<blockquote> 12747dd7cddfSDavid du Colombier<pre>outcmd1='/vol/local/lib/troff2/psxlate -r' 12757dd7cddfSDavid du Colombieroutcmd2='<b><em>{GSPATH}</em></b> -sDEVICE=sparc -sOUTPUTFILE=/dev/lpvi0 -' 12767dd7cddfSDavid du Colombier 12777dd7cddfSDavid du Colombierif [ $# -eq 0 ] 12787dd7cddfSDavid du Colombierthen 12797dd7cddfSDavid du Colombier $outcmd1 | $outcmd2 12807dd7cddfSDavid du Colombierelse 12817dd7cddfSDavid du Colombier cat $* | $outcmd1 | $outcmd2 12827dd7cddfSDavid du Colombierfi 12837dd7cddfSDavid du Colombier</pre></blockquote> 12847dd7cddfSDavid du Colombier 12853ff48bf5SDavid du Colombier<h3><a name="SPARC_problems"></a>Problems</h3> 12867dd7cddfSDavid du Colombier 12877dd7cddfSDavid du Colombier<p> 12887dd7cddfSDavid du ColombierSince <b><tt>/dev/lpi</tt></b> can be opened only for exclusive use, if 12897dd7cddfSDavid du Colombieranother job has it open (engine_ctl_sparc or another Ghostscript are the 12907dd7cddfSDavid du Colombiermost likely candidates), Ghostscript stops with "Error: /invalidfileaccess 12917dd7cddfSDavid du Colombierin --.outputpage--" 12927dd7cddfSDavid du Colombier 12937dd7cddfSDavid du Colombier<p> 12947dd7cddfSDavid du ColombierIn case of common printer problems like being out of paper, a warning 12957dd7cddfSDavid du Colombierdescribing the reason is printed to stdout. The driver tries access again 12967dd7cddfSDavid du Colombiereach five seconds. Due to a problem with the device driver (in the kernel) 12977dd7cddfSDavid du Colombierthe reason for printer failure isn't always reported correctly to the 12987dd7cddfSDavid du Colombierprogram. This is the case, for instance, if you open the top cover (error 12997dd7cddfSDavid du ColombierE5 on the printer's display). Look at the display on the printer itself if 13007dd7cddfSDavid du Colombiera "Printer problem with unknown reason" is reported. Fatal errors cause 13017dd7cddfSDavid du Colombierthe print job to be terminated. 13027dd7cddfSDavid du Colombier 1303*593dc095SDavid du Colombier<p> 1304*593dc095SDavid du ColombierNote: there is some confusion whether the resolution setting should be 1305*593dc095SDavid du Colombierthe integers 300 and 400, or the symbolic constants DPI300 and DPI400 1306*593dc095SDavid du Colombier(defined in lpviio.h). Ghostscript releases have had it both ways. It 1307*593dc095SDavid du Colombieris currently the latter. However, INOUE Namihiko reports (in bug 1308*593dc095SDavid du Colombier<a href="http://bugs.ghostscript.com/show_bug.cgi?id=215256" 1309*593dc095SDavid du Colombierclass="offsite">#215256</a>) 1310*593dc095SDavid du Colombierthat the former works better for him. If anyone 1311*593dc095SDavid du Colombierhas a definitive answer, please let us know. 1312*593dc095SDavid du Colombier 13137dd7cddfSDavid du Colombier<hr> 13147dd7cddfSDavid du Colombier 13153ff48bf5SDavid du Colombier<h2><a name="Apple"></a>Apple dot matrix printer</h2> 13167dd7cddfSDavid du Colombier 13177dd7cddfSDavid du Colombier<p> 13187dd7cddfSDavid du ColombierThis section was contributed by Mark Wedel 13197dd7cddfSDavid du Colombier<<a href="mailto:master@cats.ucsc.edu">master@cats.ucsc.edu</a>>. 13207dd7cddfSDavid du Colombier 13217dd7cddfSDavid du Colombier<p> 13227dd7cddfSDavid du ColombierThe Apple Dot Matrix Printer (DMP) was a parallel predecessor to the 13237dd7cddfSDavid du ColombierImagewriter printer. As far as I know, Imagewriter commands are a superset 13247dd7cddfSDavid du Colombierof the Dot Matrix printer's, so the driver should generate output that can 13257dd7cddfSDavid du Colombierbe printed on Imagewriters. 13267dd7cddfSDavid du Colombier 13277dd7cddfSDavid du Colombier<p> 13287dd7cddfSDavid du ColombierTo print images, the driver sets the printer for unidirectional printing 13297dd7cddfSDavid du Colombierand 15 characters per inch (cpi), or 120dpi. It sets the line feed to 1/9 13307dd7cddfSDavid du Colombierinch. When finished, it sets the printer to bidirectional printing, 13317dd7cddfSDavid du Colombier1/8-inch line feeds, and 12 cpi. There appears to be no way to reset the 13327dd7cddfSDavid du Colombierprinter to initial values. 13337dd7cddfSDavid du Colombier 13347dd7cddfSDavid du Colombier<p> 13357dd7cddfSDavid du ColombierThis code does not set for 8-bit characters (which is required). It also 13367dd7cddfSDavid du Colombierassumes that carriage return-newline is needed, and not just carriage 13377dd7cddfSDavid du Colombierreturn. These are all switch settings on the DMP, and I have configured 13387dd7cddfSDavid du Colombierthem for 8-bit data and carriage return exclusively. Ensure that the Unix 13397dd7cddfSDavid du Colombierprinter daemon handles 8-bit (binary) data properly; in my SunOS 4.1.1 13407dd7cddfSDavid du Colombier<b><tt>printcap</tt></b> file the string "<b><tt>ms=pass8,-opost</tt></b>" 13417dd7cddfSDavid du Colombierworks fine for this. 13427dd7cddfSDavid du Colombier 13437dd7cddfSDavid du Colombier<p> 13447dd7cddfSDavid du ColombierFinally, you can search <b><tt>devdemp.c</tt></b> for 13457dd7cddfSDavid du Colombier"<b><tt>Init</tt></b>" and "<b><tt>Reset</tt></b>" to find the strings that 13467dd7cddfSDavid du Colombierinitialize the printer and reset things when finished, and change them to 13477dd7cddfSDavid du Colombiermeet your needs. 13487dd7cddfSDavid du Colombier 1349*593dc095SDavid du Colombier 1350*593dc095SDavid du Colombier<hr> 1351*593dc095SDavid du Colombier 1352*593dc095SDavid du Colombier<h2><a name="Test"></a>Special and Test devices</h2> 1353*593dc095SDavid du Colombier 1354*593dc095SDavid du Colombier<p> 1355*593dc095SDavid du ColombierThe devices in this section are intended primarily for testing. They may 1356*593dc095SDavid du Colombierbe interesting as code examples, as well. 1357*593dc095SDavid du Colombier 1358*593dc095SDavid du Colombier<h3>Raw 'bit' devices</h3> 1359*593dc095SDavid du Colombier 1360*593dc095SDavid du Colombier<p>There are a collection of 'bit' devices that don't do any special formatting 1361*593dc095SDavid du Colombierbut output 'raw' binary data for the page images. These are used for benchmarking 1362*593dc095SDavid du Colombierbut can also be useful when you want to directly access the raster data.</p> 1363*593dc095SDavid du Colombier 1364*593dc095SDavid du Colombier<p> 1365*593dc095SDavid du ColombierThe raw devices are <tt>bit bitrgb bitcmyk</tt>. 1366*593dc095SDavid du Colombier 1367*593dc095SDavid du Colombier<h3><a name="Bounding_box_output"></a>Bounding box output</h3> 1368*593dc095SDavid du Colombier 1369*593dc095SDavid du Colombier<p> 1370*593dc095SDavid du ColombierThere is a special <b><tt>bbox</tt></b> "device" that just prints the 1371*593dc095SDavid du Colombierbounding box of each page. You select it in the usual way: 1372*593dc095SDavid du Colombier 1373*593dc095SDavid du Colombier<blockquote><b><tt> 1374*593dc095SDavid du Colombiergs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox 1375*593dc095SDavid du Colombier</tt></b></blockquote> 1376*593dc095SDavid du Colombier 1377*593dc095SDavid du Colombier<p> 1378*593dc095SDavid du ColombierIt prints the output in a format like this: 1379*593dc095SDavid du Colombier 1380*593dc095SDavid du Colombier<blockquote> 1381*593dc095SDavid du Colombier<pre><b><tt>%%BoundingBox: 14 37 570 719 1382*593dc095SDavid du Colombier%%HiResBoundingBox: 14.308066 37.547999 569.495061 718.319158 1383*593dc095SDavid du Colombier</tt></b></pre></blockquote> 1384*593dc095SDavid du Colombier<p></p> 1385*593dc095SDavid du Colombier 1386*593dc095SDavid du Colombier<p> 1387*593dc095SDavid du ColombierCurrently, it always prints the bounding box on <b><tt>stderr</tt></b>; 1388*593dc095SDavid du Colombiereventually, it should also recognize <b><tt>-sOutputFile=</tt></b>. 1389*593dc095SDavid du Colombier 1390*593dc095SDavid du Colombier<p> 1391*593dc095SDavid du ColombierBy default, white objects don't contribute to the bounding box because 1392*593dc095SDavid du Colombiermany files fill the whole page with white before drawing other objects. 1393*593dc095SDavid du ColombierThis can be changed by: 1394*593dc095SDavid du Colombier 1395*593dc095SDavid du Colombier<blockquote><tt><b> 1396*593dc095SDavid du Colombier<< /WhiteIsOpaque true >> setpagedevice 1397*593dc095SDavid du Colombier</b></tt></blockquote> 1398*593dc095SDavid du Colombier 1399*593dc095SDavid du Colombier<p> 1400*593dc095SDavid du ColombierNote that this device, like other devices, has a resolution and a (maximum) 1401*593dc095SDavid du Colombierpage size. As for other devices, the product (resolution x page size) is 1402*593dc095SDavid du Colombierlimited to approximately 500K pixels. By default, the resolution is 4000 1403*593dc095SDavid du ColombierDPI and the maximum page size is approximately 125", or approximately 9000 1404*593dc095SDavid du Colombierdefault (1/72") user coordinate units. If you need to measure larger pages 1405*593dc095SDavid du Colombierthan this, you must reset <em>both</em> the resolution and the page size in 1406*593dc095SDavid du Colombierpixels, e.g., 1407*593dc095SDavid du Colombier 1408*593dc095SDavid du Colombier<blockquote><b><tt> 1409*593dc095SDavid du Colombiergs -dNOPAUSE -dBATCH -sDEVICE=bbox -r100 -g500000x500000 1410*593dc095SDavid du Colombier</tt></b></blockquote> 1411*593dc095SDavid du Colombier 1412*593dc095SDavid du Colombier 1413*593dc095SDavid du Colombier<h3><a name="Permute"></a>Permutation (DeviceN color model)</h3> 1414*593dc095SDavid du Colombier 1415*593dc095SDavid du Colombier<p> 1416*593dc095SDavid du ColombierWith no additional parameters, the device named "permute" looks 1417*593dc095SDavid du Colombierto Ghostscript like a standard CMYK contone device, and outputs a 1418*593dc095SDavid du ColombierPPM file, using a simple CMYK->RGB transform. This should be the 1419*593dc095SDavid du Colombierbaseline for regression testing. 1420*593dc095SDavid du Colombier 1421*593dc095SDavid du Colombier<p> 1422*593dc095SDavid du ColombierWith the addition of <tt><b>-dPermute=1</b></tt>, the internal behavior changes 1423*593dc095SDavid du Colombiersomewhat, but in most cases the resulting rendered file should be the 1424*593dc095SDavid du Colombiersame. In this mode, the color model becomes "DeviceN" rather than 1425*593dc095SDavid du Colombier"DeviceCMYK", the number of components goes to six, and the color 1426*593dc095SDavid du Colombiermodel is considered to be the (yellow, cyan, cyan, magenta, 0, black) 1427*593dc095SDavid du Colombiertuple. This is what's rendered into the memory buffer. Finally, on 1428*593dc095SDavid du Colombierconversion to RGB for output, the colors are permuted back. 1429*593dc095SDavid du Colombier 1430*593dc095SDavid du Colombier<p> 1431*593dc095SDavid du ColombierAs such, this code should check that all imaging code paths are 1432*593dc095SDavid du Colombier64-bit clean. Additionally, it should find incorrect code that assumes 1433*593dc095SDavid du Colombierthat the color model is one of DeviceGray, DeviceRGB, or DeviceCMYK. 1434*593dc095SDavid du Colombier 1435*593dc095SDavid du Colombier<p> 1436*593dc095SDavid du ColombierCurrently, the code has the limitation of 8-bit continuous tone 1437*593dc095SDavid du Colombierrendering only. An enhancement to do halftones is planned as well. Note, 1438*593dc095SDavid du Colombierhowever, that when testing permuted halftones for consistency, it is 1439*593dc095SDavid du Colombierimportant to permute the planes of the default halftone accordingly, and 1440*593dc095SDavid du Colombierthat any file which sets halftones explicitly will fail a consistency 1441*593dc095SDavid du Colombiercheck. 1442*593dc095SDavid du Colombier 1443*593dc095SDavid du Colombier<h3><a name="SPOT"></a>spotcmyk (DeviceN color model)</h3> 1444*593dc095SDavid du Colombier 1445*593dc095SDavid du Colombier<p> 1446*593dc095SDavid du ColombierThe <tt>spotcmyk</tt> device was created for debugging and testing of the DeviceN 1447*593dc095SDavid du Colombierextensions to Ghostscript that were released in version 8.0. 1448*593dc095SDavid du ColombierThere are also another device (<tt>devicen</tt>) in the same 1449*593dc095SDavid du Colombiersource file. It were created for testing however it are not actually useful 1450*593dc095SDavid du Colombierexcept as example code. 1451*593dc095SDavid du Colombier 1452*593dc095SDavid du Colombier<p>The <tt>spotcmyk</tt> device was also designed to provide example code for a 1453*593dc095SDavid du Colombierdevice which supports spot colors. 1454*593dc095SDavid du ColombierSpot colors need to be specified prior to opening the 1455*593dc095SDavid du Colombierfirst page. 1456*593dc095SDavid du ColombierThis can be done via adding the 1457*593dc095SDavid du Colombierfollowing to the command line: <b><tt>-c "<< /SeparationColorNames [ /Name1 /Name2 ] 1458*593dc095SDavid du Colombier>> setpagedevice" -f</tt></b>. 1459*593dc095SDavid du Colombier 1460*593dc095SDavid du Colombier<p> 1461*593dc095SDavid du ColombierThe <tt>spotcmyk</tt> device produces a binary data file (similar to the bitcmyk 1462*593dc095SDavid du Colombierdevice) for the CMYK data. This data file has the name specified by the "OutputFile" 1463*593dc095SDavid du Colombierparameter. 1464*593dc095SDavid du ColombierThe device also produces a binary data file (similar to the bitmono device) 1465*593dc095SDavid du Colombierfor each spot color plane. 1466*593dc095SDavid du ColombierThese data files have the name specified by the "OutputFile" 1467*593dc095SDavid du Colombierparameter with "sn" appended to the end (where "n" is the spot color number 0 to 12)". 1468*593dc095SDavid du Colombier 1469*593dc095SDavid du Colombier<p> 1470*593dc095SDavid du ColombierAfter the <tt>spotcmyk</tt> device produces the binary data files, the files are read 1471*593dc095SDavid du Colombierand PCX format versions of these files are created with ".pcx" appended to the binary 1472*593dc095SDavid du Colombiersource file name. 1473*593dc095SDavid du Colombier 1474*593dc095SDavid du Colombier<p> If the the <tt>spotcmyk</tt> is being used with three spot colors and the 1475*593dc095SDavid du Colombier"OutputFile" parameter is <tt>xxx</tt> then the following files would be created 1476*593dc095SDavid du Colombierby the device: 1477*593dc095SDavid du Colombier 1478*593dc095SDavid du Colombier<blockquote> 1479*593dc095SDavid du Colombier<pre>xxx - binary CMYK data 1480*593dc095SDavid du Colombierxxxs0 - binary data for first spot color 1481*593dc095SDavid du Colombierxxxs1 - binary data for second spot color 1482*593dc095SDavid du Colombierxxxs2 - binary data for third spot color 1483*593dc095SDavid du Colombierxxx.pcx - CMYK data in PCX format 1484*593dc095SDavid du Colombierxxxs0.pcx - first spot color in PCX format 1485*593dc095SDavid du Colombierxxxs1.pcx - second spot color in PCX format 1486*593dc095SDavid du Colombierxxxs2.pcx - third spot color in PCX format 1487*593dc095SDavid du Colombier</pre> 1488*593dc095SDavid du Colombier</blockquote> 1489*593dc095SDavid du Colombier 1490*593dc095SDavid du Colombier<p> 1491*593dc095SDavid du ColombierThe <tt>spotcmyk</tt> device has the creation of the binary data files separated 1492*593dc095SDavid du Colombierfrom the creation of the PCX files since the source file is intended as example 1493*593dc095SDavid du Colombiercode and many people may not be interested in the PCX format. The PCX format was 1494*593dc095SDavid du Colombierchosen because it was simple to implement from preexisting code and viewers are 1495*593dc095SDavid du Colombieravailable. The PCX format does have the disadvantage that most of those viewers 1496*593dc095SDavid du Colombierare on Windows. 1497*593dc095SDavid du Colombier 1498*593dc095SDavid du Colombier 1499*593dc095SDavid du Colombier<h3><a name="XCF"></a>XCF (DeviceN color model)</h3> 1500*593dc095SDavid du Colombier 1501*593dc095SDavid du Colombier<p> 1502*593dc095SDavid du ColombierThe XCF file format is the native image format for the GIMP program. This format 1503*593dc095SDavid du Colombieris currently supported by two devices: <tt> xcfrgb</tt> and <tt>xcfcmyk</tt>. 1504*593dc095SDavid du Colombier 1505*593dc095SDavid du Colombier<blockquote><em> 1506*593dc095SDavid du ColombierWe have been warned by the people supporting the GIMP program that they reserve 1507*593dc095SDavid du Colombierthe right to change the 1508*593dc095SDavid du ColombierXCF format at anytime and thus these devices may become invalid. They are being 1509*593dc095SDavid du Colombierincluded in the documentation because we have received some questions about 1510*593dc095SDavid du Colombierthese devices do. 1511*593dc095SDavid du Colombier</em></blockquote> 1512*593dc095SDavid du Colombier 1513*593dc095SDavid du Colombier<p> 1514*593dc095SDavid du ColombierThe XCF devices were created for testing of the DeviceN extensions to Ghostscript 1515*593dc095SDavid du Colombierwhich were released in version 8.0. 1516*593dc095SDavid du Colombier 1517*593dc095SDavid du Colombier<p> 1518*593dc095SDavid du ColombierThe <tt>xcfrgb</tt> device uses a DeviceRGB process color model and creates 1519*593dc095SDavid du Colombiera normal XCF file. 1520*593dc095SDavid du Colombier 1521*593dc095SDavid du Colombier<p> 1522*593dc095SDavid du ColombierThe <tt>xcfcmyk</tt> device was created as a means of viewing spot colors for 1523*593dc095SDavid du Colombierthose users that do not have access to either Photoshop <a href=PSD">(see the PSD 1524*593dc095SDavid du Colombierdevices)</a> or a PCX viewer <a href=SPOT">(see the <tt>spotcmyk</tt> device)</a>. 1525*593dc095SDavid du Colombier 1526*593dc095SDavid du Colombier<p> 1527*593dc095SDavid du ColombierThe <tt>xcfcmyk</tt> device starts by using a DeviceCMYK process color model. The 1528*593dc095SDavid du ColombierDeviceCMYK process color model allows the <tt>xcfcmyk</tt> device to also 1529*593dc095SDavid du Colombiersupport spot colors. Spot colors need to be specified prior to opening the 1530*593dc095SDavid du Colombierfirst page. 1531*593dc095SDavid du ColombierThis can be done via adding the 1532*593dc095SDavid du Colombierfollowing to the command line: <b><tt>-c "<< /SeparationColorNames [ /Name1 /Name2 ] 1533*593dc095SDavid du Colombier>> setpagedevice" -f</tt></b>. 1534*593dc095SDavid du Colombier 1535*593dc095SDavid du Colombier<p> 1536*593dc095SDavid du ColombierAfter a page is complete, the <tt>xcfcmyk</tt> converts the CMYK image data into 1537*593dc095SDavid du ColombierRGB for storing in the XCF output file. The XCF format does not currently 1538*593dc095SDavid du Colombiersupport CMYK data directly. The spot color planes are converted into alpha 1539*593dc095SDavid du Colombierchannel planes. This is done because the XCF format does not currently support 1540*593dc095SDavid du Colombierspot colors. 1541*593dc095SDavid du Colombier 1542*593dc095SDavid du Colombier</p> 1543*593dc095SDavid du Colombier 15447dd7cddfSDavid du Colombier<!-- [2.0 end contents] ==================================================== --> 15457dd7cddfSDavid du Colombier 15467dd7cddfSDavid du Colombier<!-- [3.0 begin visible trailer] =========================================== --> 15477dd7cddfSDavid du Colombier<hr> 15487dd7cddfSDavid du Colombier 15493ff48bf5SDavid du Colombier<p> 1550*593dc095SDavid du Colombier<small>Copyright © 1996-2002 artofcode LLC. 15513ff48bf5SDavid du ColombierAll rights reserved.</small> 15527dd7cddfSDavid du Colombier 15537dd7cddfSDavid du Colombier<p> 1554*593dc095SDavid du ColombierThis software is provided AS-IS with no warranty, either express or 1555*593dc095SDavid du Colombierimplied. 1556*593dc095SDavid du Colombier 1557*593dc095SDavid du ColombierThis software is distributed under license and may not be copied, 1558*593dc095SDavid du Colombiermodified or distributed except as expressly authorized under the terms 1559*593dc095SDavid du Colombierof the license contained in the file LICENSE in this distribution. 1560*593dc095SDavid du Colombier 1561*593dc095SDavid du ColombierFor more information about licensing, please refer to 1562*593dc095SDavid du Colombierhttp://www.ghostscript.com/licensing/. For information on 1563*593dc095SDavid du Colombiercommercial licensing, go to http://www.artifex.com/licensing/ or 1564*593dc095SDavid du Colombiercontact Artifex Software, Inc., 101 Lucas Valley Road #110, 1565*593dc095SDavid du ColombierSan Rafael, CA 94903, U.S.A., +1(415)492-9861. 15667dd7cddfSDavid du Colombier 15673ff48bf5SDavid du Colombier<p> 1568*593dc095SDavid du Colombier<small>Ghostscript version 8.53, 20 October 2005 15697dd7cddfSDavid du Colombier 15707dd7cddfSDavid du Colombier<!-- [3.0 end visible trailer] ============================================= --> 15717dd7cddfSDavid du Colombier 1572*593dc095SDavid du Colombier</small></body> 15737dd7cddfSDavid du Colombier</html> 15743ff48bf5SDavid du Colombier 1575