📄 devices.htm
字号:
<html>
<head>
<title>Details of Ghostscript output devices</title>
<!-- $Id: Devices.htm $ -->
<!-- Originally: devices.txt -->
</head>
<body>
<!-- [1.0 begin visible header] -------------------------------------------- -->
<!-- [1.1 begin headline] -------------------------------------------------- -->
<p><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="#HP_color_inkjet">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">Ghostscript
overview</a>. You may also be interested in <a href="Make.htm">how to
build Ghostscript</a> and <a href="Install.htm">install it</a>, as well as
the 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 this
document: 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 sometimes
represented by "<b>in</b>" or a quotation mark (<b>"</b>) to the right
of 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 exactly
8.5in×11in, approximately 21.6cm×27.9cm. (See in the usage
documentation all the <a href="Use.htm#Known_paper_sizes">paper sizes
predefined in Ghostscript</a>.)
<dt><b>Centimeters</b> and <b>millimeters</b>
<dd>ISO standard paper sizes such as A4 and A3 are commonly represented in
the SI units of centimeters and millimeters. Centimeters are abbreviated
"<b><tt>cm</tt></b>", millimeters "<b><tt>mm</tt></b>". ISO A4 paper is
quite close to 21.0×29.7 centimeters (approximately 8.3×11.7
inches).
<dt><b>Points</b>
<dd>Points are a measure traditionally used in the printing trade and now
in PostScript, which specifies exactly 72 points per inch (approximately
28.35 per centimeter). The <a href="Use.htm#Known_paper_sizes">paper sizes
known 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>
<p>
This section was written by Russell Lang, the author of Ghostscript's MS
Windows-specific printer driver.
<p>
The <b><tt>mswinpr2</tt></b> device uses MS Windows printer drivers, and
thus should work with any printer with device-independent bitmap (DIB)
raster capabilities. The printer resolution cannot be selected using
PostScript commands from Ghostscript: use the printer setup in the Control
Panel instead.
<p>
If no Windows printer name is specified in <b><tt>-sOutputFile</tt></b>,
Ghostscript prompts for a Windows printer using the standard Print Setup
dialog box. You must set the orientation to Portrait and the page size to
that expected by Ghostscript; otherwise the image will be clipped.
Ghostscript sets the physical device size to that of the Windows printer
driver, but it does not update the PostScript clipping path.
<p>
If a Windows printer name is specified in <b><tt>-sOutputFile</tt></b> using
the format "\\spool\printer_name", for instance
<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 orientation
to match that expected by Ghostscript, but doesn't always succeed. It uses
this algorithm:
<ol>
<li>If the requested page size matches one of the Windows standard page
sizes +/- 2mm, request that standard size.
<li>Otherwise if the requested page size matches one of the Windows
standard page sizes in landscape mode, ask for that standard size in
landscape.
<li>Otherwise ask for the page size by specifying only its dimensions.
<li>If using Windows NT, select a form that matches the page size. (This
isn't working at the moment)
<li>Merge the requests above with the defaults. If the printer driver
ignores the requested paper size, no error is generated: it will print on
the wrong paper size.
<li>Open the Windows printer with the merged orientation and size.
</ol>
<p>
The Ghostscript physical device size is updated to match the Windows
printer physical device.
<hr>
<h1><a name="JFIF"></a>JPEG file format (JFIF)</h1>
<p>
Ghostscript includes output drivers that can produce <a
href="http://www.ijg.org/">Independent JPEG Group</a> JFIF (JPEG File
Interchange Format) files from PostScript images. <b>Please note</b> that
JPEG is a compression method specifically intended for continuous-tone
images such as photographs, not for graphics, and it is therefore quite
unsuitable 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 JPEG
FAQ
<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 produce
color JPEG files and <b><tt>jpeggray</tt></b> for grayscale JPEGs -- the
same as other file-format drivers: by specifying the device name and an
output 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's
size in pixels. The default resolution is normally 72×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 used
IJG quality scale, which balances the extent of compression against the
fidelity of the image when reconstituted. Lower values drop more
information from the image to achieve higher compression, and therefore
have 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's
DCTEncode 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 the
future. The JPEG drivers could be extended to support additional JPEG
compression options, such as the other DCTEncode filter parameters, but so
far they haven't been.
<hr>
<h1><a name="HP_color_inkjet"></a>H-P color inkjet printers</h1>
<p>
This section, written by George Cameron, deals with the DeskJet 500C,
DeskJet 550C, PaintJet, PaintJet XL, PaintJet XL300, the DEC LJ250
operating in Paintjet-compatible mode.
<h2><a name="HP_gdevcdj"></a>Drivers contained in <b><tt>gdevcdj.c</tt></b></h2>
<p>
The source module <b><tt>gdevcdj.c</tt></b> contains six generic drivers:
<blockquote><table cellpadding=0 cellspacing=0>
<tr valign=top> <td><b><tt>cdj500</tt></b>
<td>
<td>HP DeskJet 500C and 540C
<tr valign=top> <td><b><tt>cdj550</tt></b>
<td>
<td>HP DeskJet 550C, 560C, 660C, 660Cse
<tr valign=top> <td><b><tt>pjxl300</tt></b>
<td>
<td>HP PaintJet XL300, DeskJet 1200C, and CopyJet
<tr valign=top> <td><b><tt>pjtest</tt></b>
<td>
<td>HP PaintJet
<tr valign=top> <td><b><tt>pjxltest</tt></b>
<td>
<td>HP PaintJet XL
<tr valign=top> <td><b><tt>declj250</tt></b>
<td>
<td>DEC LJ250
</table></blockquote>
<p>
All these drivers have 8-bit (monochrome), 16-bit and 24-bit (colour) and
for the DJ 550C, 32-bit (colour, CMYK mode) options in addition to standard
colour and mono drivers. It is also possible to set various
printer-specific parameters from the command line, for example
<blockquote><b><tt>
gs -sDEVICE=cdeskjet -dBitsPerPixel=16 -dDepletion=1 -dShingling=2 tiger.ps
</tt></b></blockquote>
<p>
<b>Note:</b> the old names <b><tt>cdeskjet</tt></b>,
<b><tt>cdjcolor</tt></b> and <b><tt>cdjmono</tt></b> drivers have been
retained; however, their functionality duplicates that available using the
drivers above (and <b><tt>cdeskjet</tt></b> is identical to
<b><tt>cdj500</tt></b>). That is, we can use
<blockquote><table cellpadding=0 cellspacing=0>
<tr valign=top> <td><b><tt>gs -sDEVICE=cdj500 -dBitsPerPixel=24</tt></b>
<td>
<td>for <b><tt>cdjcolor</tt></b>, and
<tr valign=top> <td><b><tt>gs -sDEVICE=cdj500 -dBitsPerPixel=1</tt></b>
<td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -