⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 devices.htm

📁 GhostScript的源代码
💻 HTM
📖 第 1 页 / 共 5 页
字号:
	<td><b>*</b>
</table></blockquote>

<p>Also note that automagical change of one parameter depending on the
other one does not work in a <b><tt>setpagedevice</tt></b> call.  This
means that if you want to change <b><tt>Colors</tt></b> to a value whose
valid <b><tt>BitsPerPixel</tt></b> values don't include the actual
<b><tt>BitsPerPixel</tt></b> value, you must change
<b><tt>BitsPerPixel</tt></b> too.
</dl>

<dl>
<dt><b><tt>ProcessColorModel</tt></b> (symbol)
<dd>A symbol taken from <b><tt>/DeviceGray</tt></b>,
<b><tt>/DeviceRGB</tt></b> or <b><tt>/DeviceCMYK</tt></b> which can be used
to select 1, 3 or 4 colors respectively.  Note that this parameter takes
precedence over <b><tt>Colors</tt></b>, and that both affect the same
variable of the driver.  (See <b><tt>Colors</tt></b> above for values
combined with <b><tt>BitsPerPixel</tt></b>.)
</dl>

<dl>
<dt><b><tt>HWResolution</tt></b> (floats array)
<dd>An array of two floats giving the horizontal and vertical resolution in
dots per inch from among 90, 180 and 360 (the default).  Both values must
be the same.  On the Ghostscript command line, the resolution may be
changed with the <a href="Use.htm#Resolution_switch"><b><tt>-r</tt></b>
switch</a>.
</dl>

<dl>
<dt><b><tt>ManualFeed</tt></b> (bool)
<dd>Indicate that the sheets won't be fed automatically by the printer,
<b><tt>false</tt></b> by default.  (Not meaningful on the BJC-600, I fear.)
</dl>

<dl>
<dt><b><tt>MediaType</tt></b> (string)
<dd>The media to print on, chosen from among "<b><tt>PlainPaper</tt></b>",
"<b><tt>CoatedPaper</tt></b>", "<b><tt>TransparencyFilm</tt></b>",
"<b><tt>Envelope</tt></b>", "<b><tt>Card</tt></b>" and
"<b><tt>Other</tt></b>".  Default is "<b><tt>PlainPaper</tt></b>".  For
"<b><tt>Envelope</tt></b>", "<b><tt>Card</tt></b>" or
"<b><tt>Other</tt></b>" the driver puts the printer into thick mode
automatically regardless of the actual media weight.
</dl>

<dl>
<dt><b><tt>MediaWeight</tt></b> (int or null)
<dd>The weight of the media in grams per square meter.  Null (the default)
indicates that the weight is of no importance.  If the specified media
weight is greater than 105 (that is, the value of the compilation default
<b><tt>BJC</tt></b>???<b><tt>_MEDIAWEIGHT_THICKLIMIT</tt></b>) then the
printer will be set to use thick paper.
</dl>

<dl>
<dt><b><tt>PrintQuality</tt></b> (string)
<dd>The quality of printing.
<table cellpadding=0 cellspacing=0>
<tr valign=bottom>
	<th align=left>Value
	<td>&nbsp;&nbsp;
	<th align=left><b><tt>bjc600</tt></b>
	<td>&nbsp;&nbsp;
	<th align=left><b><tt>bjc800</tt></b>
	<td>&nbsp;&nbsp;
	<th align=left>&nbsp;
<tr>	<td colspan=7><hr>
<tr valign=top>	<td><b><tt>Low</tt></b>
	<td>&nbsp;
	<td>&nbsp;
	<td>&nbsp;
	<td align=center><b>X</b>
	<td>&nbsp;
	<td>Has the effect of making only two printing passes instead of four, so should be twice the speed; known as "CN" (Color Normal) mode
<tr valign=top>	<td><b><tt>Draft</tt></b>
	<td>&nbsp;
	<td align=center><b>X</b>
	<td>&nbsp;
	<td align=center><b>X</b>
	<td>&nbsp;
	<td>Unlights the "HQ" light on a BJC-600
<tr valign=top>	<td><b><tt>Normal</tt></b>
	<td>&nbsp;
	<td align=center><b>X</b>
	<td>&nbsp;
	<td align=center><b>X</b>
	<td>&nbsp;
	<td>Default for both drivers; lights the "HQ" light on a BJC-600
<tr valign=top>	<td><b><tt>High</tt></b>
	<td>&nbsp;
	<td align=center><b>X</b>
	<td>&nbsp;
	<td align=center><b>X</b>
	<td>&nbsp;
	<td>Means 200% black and 100% CMY; lights the "Bk+" light on a BJC-600
</table>
</dl>

<dl>
<dt><b><tt>DitheringType</tt></b> (string)
<dd>Dithering algorithm from between "<b><tt>Floyd-Steinberg</tt></b>" and
"<b><tt>None</tt></b>". "<b><tt>None</tt></b>" is the default for 1/1 print
mode, "<b><tt>Floyd-Steinberg</tt></b>" for other modes.  At the moment
this parameter is read-only, though no error is generated if one tries to
change it.  This parameter is not of much value at the moment and is here
mainly to reserve the name for future addition of dithering algorithms.
</dl>

<dl>
<dt><b><tt>PrintColors</tt></b> (int)
<dd>Mask for printing color.  If 0, use black for any color; otherwise the
value must be the sum of any of 1 (cyan), 2 (magenta), 4 (yellow) and 8
(black), indicating which colors will be used for printing.  When printing
colour, only colours specified will be printed (this means that some planes
will be missing if a color's value above is omitted).  When printing grays,
black is used if it is present in the <b><tt>PrintColors</tt></b>;
otherwise, the image is printed by superimposing each requested color.
</dl>

<dl>
<dt><b><tt>MonochromePrint</tt></b> (bool)
<dd><b>For <tt>bjc600</tt> only</b>, <b><tt>false</tt></b> by default.
Substitute black for Cyan, Magenta and Yellow when printing -- useful, for
example, to get some monochrome output of a dithered printing This is a
hardware mechanism as opposed to the previous software one. I think that
using this or setting <b><tt>PrintColors</tt></b> to 0 will give the same
results.
</dl>

<p>
Note that the <b><tt>MediaType</tt></b> and <b><tt>ThickMedia</tt></b>
options will be replaced by the use of the device
<b><tt>InputAttributes</tt></b> and <b><tt>OutputAttributes</tt></b> as
soon as possible.  Please note too that the print mode may be reset at the
start of printing, not at the end.  This is the expected behaviour.  If you
need to reset the printer to its default state, simply print a file that
does just a <b><tt>showpage</tt></b>.

<h3><a name="BJC_device_info"></a>Device information</h3>

<p>
Here is other information published by the driver that you will find
in the <b><tt>deviceinfo</tt></b> dictionary.

<dl>
<dt><b><tt>OutputFaceUp</tt></b> (bool)
<dd>This has the boolean value <b><tt>true</tt></b>, indicating that the
sheets are stacked face up.
</dl>

<dl>
<dt><b><tt>Version</tt></b> (float)
<dd>In the form <b>M.</b><em>mm</em>pp, where <b>M</b> is the major
version, <em>mm</em> the bjc driver's minor version, and pp the specific
driver minor version (that is, <b><tt>M.</tt></b><em>mm</em> will always be
the same for the <b><tt>bjc600</tt></b> and <b><tt>bjc800</tt></b>
drivers).
</dl>

<dl>
<dt><b><tt>VersionString</tt></b> (string)
<dd> A string showing the driver version and other indications.  At the
moment, things like "a" or "b" may follow the version to indicate alpha or
beta versions.  The date of the last change to this version is given in the
form MM/DD/YY (no, it won't adapt to your locale).
</dl>

<h3><a name="BJC_HW_margins"></a>Hardware margins</h3>

<p>
The BJC printers have top and bottom hardware margins of 3mm and 7.1mm
respectively (Canon says 7mm, but this is unusable because of the rounding
of paper sizes to PostScript points).  The left margin is 3.4mm for A4 and
smaller paper sizes, 6.4mm for U.S. paper sizes, envelopes and cards.  It
is 4.0mm for A3 paper on the BJC-800.

<p>
The maximum printing width of a BJC-600 printer is 203mm.  The maximum
printing width of a BJC-800 printer is 289mm on A3 paper, 203mm on
U.S. letter and ISO A4 paper.

<h3><a name="BJC_PPD"></a>PostScript printer description (PPD) files</h3>

<p>
The files <b><tt>CBJC600.PPD</tt></b> and <b><tt>CBJC800.PPD</tt></b> (whose
long names are, respectively, <b><tt>Canon_BubbleJetColor_600.ppd</tt></b>
and <b><tt>Canon_BubbleJetColor_800.ppd</tt></b>) are PPD files to drive the
features of the <b><tt>bjc600</tt></b> and <b><tt>bjc800</tt></b> drivers.
They can be used, for example, on NextStep systems (presumably on OpenStep
systems too) and on Unix systems with Adobe's TranScript and
<b><tt>pslpr</tt></b> (not tested).  The files are not complete at the
moment.  Please note that NextStep's printing interface does not
correctly enforce constraints specified in these files (in UIConstraints
descriptions): you must force yourself to use valid combinations of
options.

<h3><a name="BJC_PPD_custom"></a>Customizing the PPD files</h3>

<p>
By default the PPD files are set for U.S. letter size paper, and they use a
normalized transfer function.  If you choose to use A4 printing by default,
you must replace "<b><tt>Letter</tt></b>" with "<b><tt>A4</tt></b>" in
these (noncontiguous) lines:

<blockquote>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[...]<br>
<b><tt>*DefaultPageSize: Letter<br></tt></b>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[...]<br>
<b><tt>*DefaultRegion: Letter<br></tt></b>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[...]<br>
<b><tt>*DefaultImageableArea: Letter</tt></b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[...]<br>
</blockquote>

<p>
Some versions of Ghostscript have problems with normalized colors, which
makes them add magenta in gray levels.  If you experience this problem,
in the PPD file replace the line

<blockquote><b><tt>
<b><tt>*DefaultTransfer: Normalized</tt></b>
</tt></b></blockquote>

<p>
with the alternate line

<blockquote><b><tt>
<b><tt>*DefaultTransfer: Null</tt></b>
</tt></b></blockquote>

<p>
The "thick media" option is implemented by choosing a value of 120 or 80
(for thick and thin media respectively) for the <b><tt>MediaWeight</tt></b>
feature of the drivers.  If you ever change the threshold for thick media
in the driver code, you may need to change the values in the PPD files too.

<p>
All customization should be done using the "<b><tt>*Include:</tt></b>"
feature of PPD files so that your local changes will be retained if you
update the PPD files.

<h2><a name="BJC_bugs"></a>How to report problems</h2>

<p>
If you have problems with this driver (or if you are extremely satisfied
with it, you may email me directly at
&lt;<a href="mailto:yves.arrouye@usa.net">yves.arrouye@usa.net</a>&gt;.
When you report a problem please be as descriptive as possible, and please
send information that can be used to reproduce the problem.  Don't forget
to say which driver you use, and in what version.  Version information can
be found in the source code of the driver or by issuing the following
command in a shell:

<blockquote><b><tt>
echo&nbsp;"currentpagedevice&nbsp;/VersionString&nbsp;get&nbsp;=="&nbsp;|&nbsp;gs&nbsp;-q&nbsp;-sDEVICE=bjc600&nbsp;-
</tt></b></blockquote>

<h2><a name="BJC_acks"></a>Acknowledgements</h2>

<p>
I am particularly grateful to Yoshio Kuniyoshi &lt;<a
href="mailto:yoshio@nak.math.keio.ac.jp">yoshio@nak.math.keio.ac.jp</a>&gt;
without whom I'd never make these drivers, and also to L. Peter Deutsch,
who answered all my (often silly) questions about Ghostscript's driver
interface.

<p>
Thanks also to the people who volunteered to beta-test the v2.x BJC
drivers: David Gaudine
&lt;<a href="mailto:david@donald.concordia.ca">david@donald.concordia.ca</a>&gt;,
Robert M. Kenney &lt;<a href="mailto:rmk@unh.edu">rmk@unh.edu</a>&gt;,
James McPherson
&lt;<a href="mailto:someone@erols.com">someone@erols.com</a>&gt;
and Ian Thurlbeck
&lt;<a href="mailto:ian@stams.strath.ac.uk">ian@stams.strath.ac.uk</a>&gt;
(listed alphabetically) were particularly helpful by discovering bugs and
helping find out exact paper margins on printers I don't have access to.

<p>
And many thanks to Klaus-Gunther Hess
&lt;<a href="mailto:ghess@elmos.de">ghess@elmos.de</a>&gt; for looking
at the dithering code and devising a good CMYK dithering algorithm for the
Epson Stylus Color, which I then adapted to the code of these drivers.

<hr>

<h1><a name="STC_epson_stylus"></a>Epson Stylus color printer (see also <b><tt>uniprint</tt></b>)</h1>

<p>
This section was contributed by Gunther Hess
&lt;<a href="mailto:ghess@elmos.de">ghess@elmos.de</a>&gt;, who also wrote
<b><tt>uniprint</tt></b>, a later set of drivers.  You should probably see
the section on <a href="#Uniprint"><b><tt>uniprint</tt></b></a> for whether
it might be better for your uses than this driver.

<h2><a name="STC_usage"></a>Usage</h2>

<p>

This driver is selected with "<b><tt>-sDEVICE=stcolor</tt></b>", producing
output for an Epson Stylus Color at 360dpi resolution by default.  But it
can do much more with this printer, and with significantly better quality,
than with the default mode; and it can also produce code for monochrome
versions of the printer.  This can be achieved via either command-line
options or Ghostscript input.  For convenience a PostScript file is
supplied for use as an initial input file.  Try the following command:

<blockquote>
<b><tt>gs -sDEVICE=stcolor -r</tt></b><b>{Xdpi}</b><b><tt>x</tt></b><b>{Ydpi}</b><b><tt> stcolor.ps</tt></b> <b>{YourFile.ps}</b>
</blockquote>

<p>
where <b>{Xdpi}</b> is one of 180, 360, or 720 and <b>{Ydpi}</b> is one of
90, 180, 360, or 720.  The result should be significantly better.  You may
use <b><tt>stcolor.ps</tt></b> with other devices too, but I do not
recommend this, since it does nothing then. <b><tt>stcolor.ps</tt></b>
should be available with binary distributions and should reside in the same
directory as other Ghostscript initialization files or in the same
directory as the files to be printed.  Thus if Ghostscript is part of your
printer-spooler, you can insert

<blockquote><b><tt>
(stcolor.ps) findlibfile { pop run } if pop
</tt></b></blockquote>

<p>
in files you want to use the improved algorithms.  You may want to adapt
<b><tt>stcolor.ps</tt></b> file to your specific needs.  The methods and
options for this are described here, but this description is restricted to
Ghostscript options, while their manipulation at the PostScript level is
documented in the material on <a href="Language.htm">the relationship of
Ghostscript and PostScript</a> and in <b><tt>stcolor.ps</tt></b>.

<h2><a name="STC_options"></a>Options</h2>

<p>
Now to explain the options (as written on my UNIX system).  The order is
somehow related to their use during the printing process:

<dl>
<dt><b><tt>-dUnidirectional</tt></b>
<dd>Force unidirectional printing, recommended for transparencies
</dl>

<dl>
<dt><b><tt>-dMicroweave</tt></b>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -