henesyinit from p9fd787fda5 years agoHistory
5085 lines · 160.7 KB · HTML
RawDownload
<html><head><title>Details of Ghostscript output devices</title><!-- $Id: Devices.htm,v 1.3 2000/03/16 08:09:42 lpd Exp $ --><!-- Originally: devices.txt --></head> <body><!-- [1.0 begin visible header] ============================================ --> <!-- [1.1 begin headline] ================================================== --> <table width="100%" border="0"><tr><th align="center" bgcolor="#CCCC00"><font size=6>Details of Ghostscript output devices</font></table> <!-- [1.1 end headline] ==================================================== --> <!-- [1.2 begin table of contents] ========================================= --> <h2>Table of contents</h2> <blockquote><ul><li><a href="#Measurements">Notes on measurements</a><li><a href="#Win">MS Windows printers</a><li><a href="#JFIF">JPEG file format (JFIF)</a><li><a href="#HP8_color_inkjet">H-P 8xx, 1100, and 1600 color inkjet printers</a><ul><li><a href="#HP8_gdevcd8">Drivers contained in <b><tt>gdevcd8.c</tt></b></a><li><a href="#HP8_further_documentation">Further documentation</a></ul><li><a href="#HP880_color_inkjet">H-P 812, 815, 832, 880, 882, 895, and 970 color inkjet printers</a><ul><li><a href="#HP880_gdevcd8">Drivers contained in <b><tt>gdevcd8.c</tt></b></a><li><a href="#HP880_further_documentation">Further documentation</a></ul><li><a href="#HP_color_inkjet">Other H-P color inkjet printers</a><ul><li><a href="#HP_gdevcdj">Drivers contained in <b><tt>gdevcdj.c</tt></b></a><li><a href="#HP_paper_size">Default paper size</a><li><a href="#HP_limits">Deskjet physical limits</a><li><a href="#HP_command_line">Printer properties (command-line parameters)</a><ul><li><a href="#HP_bpp">Bits per pixel</a><li><a href="#HP_deskjet_properties">Deskjet properties</a><li><a href="#HP_paintjet_properties">Paintjet XL300 / Paintjet XL properties</a></ul><li><a href="#HP_gamma">Gamma correction</a><li><a href="#HP_resolution_enhance">HP's resolution-enhanced mode for Inkjet printers</a><li><a href="#HP_tips">General tips</a></ul><li><a href="#BJC">Canon BubbleJet (BJC) printers</a><ul><li><a href="#BJC_history">History</a><li><a href="#BJC_build">Configuring and building the BJC drivers</a><ul><li><a href="#BJC_defaults">Modify values in <b><tt>gdevbjc.h</tt></b></a><li><a href="#BJC_CMYK_RGB">CMYK-to-RGB color conversion</a><li><a href="#BJC_vertical_centering">Vertical centering of the printable area</a><li><a href="#BJC_margins">Page margins</a><li><a href="#BJC_compile">Makefile and compilation</a></ul><li><a href="#BJC_usage">Use of the drivers</a><ul><li><a href="#BJC_options">Supported Options and Defaults</a><li><a href="#BJC_device_info">Device information</a><li><a href="#BJC_HW_margins">Hardware margins</a><li><a href="#BJC_PPD">PostScript printer description (PPD) files</a><li><a href="#BJC_PPD_custom">Customizing the PPD files</a></ul><li><a href="#BJC_bugs">How to report problems</a><li><a href="#BJC_acks">Acknowledgements</a></ul><li><a href="#STC_epson_stylus">Epson Stylus color printer (see also <b><tt>uniprint</tt></b>)</a><ul><li><a href="#STC_usage">Usage</a><li><a href="#STC_options">Options</a><li><a href="#STC_FAQ">Application note and FAQ</a><ul><li><a href="#STC_FAQ_A3">Support for A3 paper</a><li><a href="#STC_FAQ_margins">Margins, PageSize</a><li><a href="#STC_FAQ_II_IIS_1500">Stylus Color II / IIs and 1500</a></ul><li><a href="#STC_recommendations">Recommendations</a><ul><li><a href="#STC_dither_experiment">Color dithering experiments with <b><tt>gdevstc</tt></b> 1.21</a></ul><li><a href="#STC_color_transform">Color transformation</a><li><a href="#STC_CAM"><b><tt>ColorAdjustMatrix</tt></b></a><li><a href="#STC_RGBCMYK_coding">RGB / CMYK coding and transfer, and <b><tt>BitsPerPixel</tt></b></a><li><a href="#What_is_weaving">What is weaving?</a><li><a href="#STC_print_modes">Print mode parameters</a><ul><li><a href="#STC_unidirectional"><b><tt>Unidirectional</tt></b></a><li><a href="#STC_noweave"><b><tt>Microweave</tt></b>, <b><tt>noWeave</tt></b> and <b><tt>OutputCode=deltarow</tt></b></a><li><a href="#STC_model"><b><tt>Model</tt></b></a></ul><li><a href="#STC_Pitfalls">Bugs and pitfalls</a><li><a href="#STC_Tests">Tests</a><ul><li><a href="#STC_OutputCodes">The various OutputCodes</a><li><a href="#STC_printing_time">Printing time related to other options</a></ul><li><a href="#STC_acks">Acknowledgments</a></ul><li><a href="#Uniprint">uniprint, a flexible unified printer driver</a><ul><li><a href="#Uni_state">The state of this driver</a><li><a href="#Uni_background">Notes on <b><tt>uniprint</tt></b>'s background</a><li><a href="#Uni_make_pfile">Godzilla's guide to the creation of Unified Printer Parameter (<b><tt>.upp</tt></b>) files</a><li><a href="#Uni_all_parameters">All parameters in brief</a><li><a href="#Uni_honors"><b><tt>uniprint</tt></b>'s Roll of Honor</a></ul><li><a href="#SPARCprinter">Sun SPARCprinter</a><ul><li><a href="#SPARC_install">Installation</a><li><a href="#SPARC_problems">Problems</a></ul><li><a href="#Apple">Apple dot matrix printer</a></ul></blockquote> <!-- [1.2 end table of contents] =========================================== --> <!-- [1.3 begin hint] ====================================================== --> <p>For other information, see the <a href="Readme.htm">Ghostscriptoverview</a>.  You may also be interested in <a href="Make.htm">how tobuild Ghostscript</a> and <a href="Install.htm">install it</a>, as well asthe description of the <a href="Drivers.htm">driver interface</a>. <!-- [1.3 end hint] ======================================================== --> <hr> <!-- [1.0 end visible header] ============================================== --> <!-- [2.0 begin contents] ================================================== --> <h1><a name="Measurements"></a>Notes on measurements</h1> <p>Several different important kinds of measures appear throughout thisdocument: inches, centimeters and millimeters, points, and bits per pixel. <dl><dt><b>Inches</b><dd>1 inch equals 2.54 centimeters.  The inch measure is sometimesrepresented by "<b>in</b>" or a quotation mark (<b>&quot;</b>) to the rightof a measure, like <b>8.5in</b> or <b>8.5"</b>.  Dots per inch,"<b>dpi</b>", are the common measure of printing resolution for dot-matrix,laser, and ink-jet printers.  U.S. "letter" paper is exactly8.5in&times;11in, approximately 21.6cm&times;27.9cm.  (See in the usagedocumentation all the <a href="Use.htm#Known_paper_sizes">paper sizespredefined in Ghostscript</a>.) <dt><b>Centimeters</b> and <b>millimeters</b><dd>ISO standard paper sizes such as A4 and A3 are commonly represented inthe SI units of centimeters and millimeters.  Centimeters are abbreviated"<b><tt>cm</tt></b>", millimeters "<b><tt>mm</tt></b>".  ISO A4 paper isquite close to 21.0&times;29.7 centimeters (approximately 8.3&times;11.7inches). <dt><b>Points</b><dd>Points are a measure traditionally used in the printing trade and nowin PostScript, which specifies exactly 72 points per inch (approximately28.35 per centimeter).  The <a href="Use.htm#Known_paper_sizes">paper sizesknown to Ghostscript</a> are defined in the initialization file<b><tt>gs_statd.ps</tt></b> in terms of points. <dt><b>Bits per pixel</b><dd>Commonly abbreviated "<b><tt>bpp</tt></b>".</dl> <hr> <h1><a name="Win"></a>MS Windows printers</h1> <h1><a name="Win"></a>MS Windows printers</h1> <p>This section was written by Russell Lang, the author of Ghostscript'sMS&nbsp;Windows-specific printer driver, and updated by<a href="mailto:Pierre.Arnaud@opac.ch">Pierre Arnaud</a>,the current maintainer.</p> <p>The <b><tt>mswinpr2</tt></b> device uses MS&nbsp;Windows printer drivers, andthus should work with any printer with device-independent bitmap (DIB)raster capabilities. The printer resolution cannot be selected directlyusing PostScript commands from Ghostscript: use the printer setup in theControl Panel instead. It is however possible to specify a maximum resolutionfor the printed document (see below).</p> <p>If no Windows printer name is specified in <b><tt>-sOutputFile</tt></b>,Ghostscript prompts for a Windows printer using the standard Print Setupdialog box.  You must set the orientation to Portrait and the page size tothat expected by Ghostscript; otherwise the image will be clipped.Ghostscript sets the physical device size to that of the Windows printerdriver, but it does not update the PostScript clipping path.</p> <p>If a Windows printer name is specified in <b><tt>-sOutputFile</tt></b> usingthe format <tt>"\\spool\printer_name"</tt>, for instance</p> <blockquote><b><tt>gs ... -sOutputFile="\\spool\Apple LaserWriter II NT"</tt></b></blockquote> <p>then Ghostscript attempts to open the Windows printer without prompting(except, of course, if the printer is connected to <b><tt>FILE:</tt></b>).Ghostscript attempts to set the Windows printer page size and orientationto match that expected by Ghostscript, but doesn't always succeed.  It usesthis algorithm:</p> <ol><li>If the requested page size matches one of the Windows standard pagesizes +/- 2mm, request that standard size.</li> <li>Otherwise if the requested page size matches one of the Windowsstandard page sizes in landscape mode, ask for that standard size inlandscape.</li> <li>Otherwise ask for the page size by specifying only its dimensions.</li> <li>Merge the requests above with the defaults.  If the printer driverignores the requested paper size, no error is generated: it will print onthe wrong paper size.</li> <li>Open the Windows printer with the merged orientation and size.</li></ol> <p>The Ghostscript physical device size is updated to match the Windowsprinter physical device.</p> <h2><a name="Win_properties"></a>Supported command-line parameters</h2> <p>The <b><tt>mswinpr2</tt></b> device supports a limited number of command-lineparameters (e.g. it does not support setting the printer resolution). Therecognized parameters are the following:</p> <blockquote><dl><dt><b><tt>-sDEVICE=mswinpr2</tt></b></dt><dd>Selects the MS&nbsp;Windows printer device. If Ghostscript was notcompiled with this device as the default output device, you have to specifyit on the command line.</dd> <dt><b><tt>-dNoCancel</tt></b></dt><dd>Hides the progress dialog, which shows the percent of the document pagealready processed and also provides a <em>cancel</em> button. This optionis useful if GS is intended to print pages in the background, without anyuser intervention.</dd> <dt><b><tt>-sOutputFile=</tt></b><b>"\\spool\<em>printer_name</em>"</b></dt><dd>Specifies which printer should be used. The <em>printer_name</em> should betyped exactly as it appears in the Printers control panel, including spaces.</dd> </dl></blockquote> <h2><a name="Win_options"></a>Supported options (device properties)</h2> <p>Several extra options exist which cannot be set through the command-line,but only by executing the appropriate PostScript setup code. These optionscan be set through the inclusion of a setup file on the command-line:</p> <blockquote><b><tt>gs ... setup.ps ...</tt></b></blockquote> <p>The <tt>setup.ps</tt> file is responsible for the device selection, thereforeyou should not specify the <b><tt>-sDEVICE=mswinpr2</tt></b> option on thecommand-line if you are using such a setup file. Here is an example of sucha setup file:</p> <blockquote><pre>mark  /NoCancel      true                       % don't show the cancel dialog  /BitsPerPixel  4                          % force 4 bits/pixel  /UserSettings    &lt;&lt;      /DocumentName  (Ghostscript document) % name for the Windows spooler      /MaxResolution 360                    % maximum document resolution    &gt;&gt;  (mswinpr2) finddevice                     % select the Windows device driver  putdevicepropssetdevice</pre></blockquote> <p>This example disables the progress dialog (same as the <tt><b>-dNoCancel</b></tt>option), forces a 4 bits/pixel output resolution and specifies additional usersettings, such as the document name (which will be displayed by the Windowsspooler for the queued document) and the maximum resolution (here 360&nbsp;dpi).It then finds and selects an instance of the MS&nbsp;Windows device printerand activates it. This will show the standard printer dialog, since no<tt><b>/OutputFile</b></tt> property was specified.</p> <p>The following options are available:</p> <blockquote><dl><dt><b><tt>/NoCancel <em>boolean</em></tt></b><dd>Disables (hides) the progress dialog when set to <em><tt>true</tt></em> orshow the progress dialog if not set or set to <em><tt>false</tt></em>.</dd></dt> <dt><b><tt>/OutputFile <em>string</em></b></tt></dt><dd>Specifies which printer should be used. The string should be of the form<tt><b>\\spool\<em>printer_name</em></b></tt>, where the <em>printer_name</em> should betyped exactly as it appears in the Printers control panel, including spaces.</dd></dt> <dt><b><tt>/QueryUser <em>integer</em></tt></b><dd>Shows the standard printer dialog (<tt><b>1</b></tt> or any other value),shows the <em>printer setup dialog</em> (<tt><b>2</b></tt>) or selects the<em>default Windows printer</em> without any user interaction (<tt><b>3</b></tt>).</dd></dt> <dt><b><tt>/BitsPerPixel <em>integer</em></tt></b><dd>Sets the device depth to the specified bits per pixel. Currently supportedvalues are <tt><b>1</b></tt> (monochrome), <tt><b>4</b></tt> (CMYK with screeninghandled by Ghostscript) and <tt><b>24</b></tt> (True Color, dithering handled bythe Windows printer driver; this option can produce huge print jobs).</dd></dt> <dt><b><tt>/UserSettings <em>dict</em></tt></b><dd>Sets additional options, defined in a dictionary. The following properties canbe set:</dd> <dl><dt><b><tt>/DocumentName <em>string</em></tt></b><dd>Defines the user friendly document name which will be displayed by theWindows spooler.</dd></dt> <dt><b><tt>/DocumentRange <em>[n1 n2]</em></tt></b><dd>Defines the range of pages contained in the document. This information canbe used by the printer dialog, in conjunction with the following property.</dd></dt> <dt><b><tt>/SelectedRange <em>[n1 n2]</em></tt></b><dd>Defines the selected range of pages. This information will be displayed inthe printer dialog and will be updated after the user interaction. A PostScriptprogram could check these values and print only the selected page range.</dd></dt> <dt><b><tt>/MaxResolution <em>dpi</em></tt></b><dd>Specifies the maximum tolerated output resolution. If the selected printer hasa higher resolution than <tt><b>dpi</b></tt>, then Ghostscript will render thedocument with a submultiple of the printer resolution. For example, if <tt><b>MaxResolution</b></tt> is set to 360 and the output printer supportsup to 1200 dpi, then Ghostscript renders the document with an internalresolution of 1200/4=300 dpi. This can be very useful to reduce the memoryrequirements when printing in True Color on some high resolution ink-jet colorprinters.</dd></dt> </dl></dt> </dl></blockquote> <p>These properties can be queried through the <tt><b>currentpagedevice</b></tt>operator. The following PostScript code snippet shows how to do it for someof the properties:</p> <blockquote><pre>currentpagedevice /BitsPerPixel get ==  % displays the selected depth currentpagedevice /UserSettings get     % get the additional options../us exch def                            % ..and assign them to a variable us /DocumentName get ==     % displays the document nameus /SelectedRange get ==    % displays the selected page range % other misc. informations (don't rely on them) us /Color get ==            % 1 => monochrome output, 2 => color outputus /PrintCopies get ==      % displays the number of copies requested</pre></blockquote> <p>There are a few undocumented informations stored in the <tt><b>UserSettings</b></tt>dictionary. You should not rely on them. Their use is still experimental andthey could be removed in a future version.</p> <h2><a name="Win_duplex"></a>Duplex printing</h2> <p>If the Windows printer supports the duplex printing feature, then it willalso be available through the <b><tt>mswinpr2</tt></b> device. You can queryfor this support through the <b><tt>/Duplex</tt></b> propery of the<b><tt>currentpagedevice</tt></b>. If it returns <b><tt>null</tt></b>, thenthe feature is not supported by the selected printer. Otherwise, <b><tt>true</tt></b>means that the printer is currently set up to print on both faces of the paperand <b><tt>false</tt></b> that it is not, but that it can.</p> <p>The following example shows how to print on both faces of the paper (usingthe long side of the paper as the reference):</p> <blockquote><pre>&lt;&lt; /Duplex true /Tumble false &gt;&gt; setpagedevice</pre></blockquote> <p></p> <hr> <h1><a name="JFIF"></a>JPEG file format (JFIF)</h1> <p>Ghostscript includes output drivers that can produce <ahref="http://www.ijg.org/">Independent JPEG Group</a> JFIF (JPEG FileInterchange Format) files from PostScript images.  <b>Please note</b> thatJPEG is a compression method specifically intended for continuous-toneimages such as photographs, not for graphics, and it is therefore quiteunsuitable for the vast majority of page images produced with PostScript,which should be saved in a form better for graphics, such as<a href="http://www.cdrom.com/pub/png/">Portable Network Graphics</a> (PNG)format.  If you get crummy-looking JPEG files, don't blame Ghostscript;instead consult a reference about uses and abuses of JPEG, such as the JPEGFAQ <blockquote><a href="http://www.faqs.org/faqs/jpeg-faq/">http://www.faqs.org/faqs/jpeg-faq/</a></blockquote> <p>You can use the JPEG output drivers -- <b><tt>jpeg</tt></b> to producecolor JPEG files and <b><tt>jpeggray</tt></b> for grayscale JPEGs -- thesame as other file-format drivers: by specifying the device name and anoutput file name, for example <blockquote><b><tt>gs -sDEVICE=jpeg -sOutputFile=foo.jpg foo.ps</tt></b></blockquote> <p>You can also use the <a href="Use.htm#Resolution_switch"><b><tt>-r</tt></b>switch</a> to specify the imaging resolution and thus the output file'ssize in pixels.  The default resolution is normally 72&times;72dpi. <p>The JPEG devices support several special parameters to control the JPEG"quality setting" (DCT quantization level). <blockquote><dl><dt><b><tt>-dJPEGQ=</tt></b><b><em>N</em></b> (integer from 0 to 100, default 75)<dd>Set the quality level <b><em>N</em></b> according to the widely usedIJG quality scale, which balances the extent of compression against thefidelity of the image when reconstituted.  Lower values drop moreinformation from the image to achieve higher compression, and thereforehave lower quality when reconstituted. <dt><b><tt>-dQFactor=</tt></b><b><em>M</em></b> (float from 0.0 to 1.0)<dd>Adobe's QFactor quality scale, which you may use in place of<b><tt>JPEGQ</tt></b> above.  The QFactor scale is used by PostScript'sDCTEncode filter but is nearly unheard-of elsewhere.</dl></blockquote> <p>At this writing the default JPEG quality level of 75 is equivalent to<b><tt>-dQFactor=0.5</tt></b>, but the JPEG default might change in thefuture.  The JPEG drivers could be extended to support additional JPEGcompression options, such as the other DCTEncode filter parameters, but sofar they haven't been. <hr> <h1><a name="HP8_color_inkjet"></a>H-P 8xx, 1100, and 1600 color inkjet printers</h1> <p>This section, written by Uli Wortmann &lt;<ahref="mailto:uliw@erdw.ethz.ch">uliw@erdw.ethz.ch</a>&gt;, deals with theDeskJet 670, 690, 850, 855, 870, 890, 1100, and 1600. <h2><a name="HP8_gdevcd8"></a>Drivers contained in <b><tt>gdevcd8.c</tt></b></h2>

Lines 1–500 of 5085.