📄 devices.htm
字号:
of this definition, <b><tt>USE_FIXED_MARGINS</tt></b> will not allow the
BJC-800 to use the lower 7mm bottom margin, so if you have a problem with
the bottom margin on a BJC-800, just define that (without defining
<b><tt>USE_TIGHT_MARGINS</tt></b>, of course).
<p>
A quick way to be sure the margins you selected is to print a file whose
contents are:
<blockquote><b><tt>
%!<br>
clippath stroke showpage
</tt></b></blockquote>
<p>
If the margins are okay, you will get a rectangle visibly surrounding
the printable area. If they're not correct, one or more of the sides will
be either incomplete or completely unprinted.
<h3><a name="BJC_compile"></a>Makefile and compilation</h3>
<p>
Make sure the <b><tt>bjc600</tt></b> or <b><tt>bjc800</tt></b> devices are
in <a href="Make.htm#Features_and_devices"><b><tt>DEVICE_DEVS</tt></b> in
the makefile</a>; that is, look in the makefile for your platform and add
them if necessary -- they may already be there. As of Ghostscript 5.10,
for instance, one makefile has
<blockquote><b><tt>
DEVICE_DEVS6=bj10e.dev bj200.dev bjc600.dev bjc800.dev
</tt></b></blockquote>
<h2><a name="BJC_usage"></a>Use of the drivers</h2>
<p>
There are two drivers here. The "<b><tt>bjc600</tt></b>" one supports the BJC-600 and
BJC-4xxx (maybe the BJC-70 as well) and the "<b><tt>bjc800</tt></b>" one supports the
BJC-800 series. Remarks here that apply to both drivers use the name
"bjc".
<h3><a name="BJC_options"></a>Supported Options and Defaults</h3>
<p>
Note: "options", "properties", and "parameters" designate the same thing:
device parameters that you can change.
<p>
Giving an option an incorrect value causes an error. Unless stated
otherwise, this error will be a rangecheckerror. Options may be set from
the Ghostscript command line (using the <b><tt>-d</tt></b> and
<b><tt>-s</tt></b> switches or other predetermined switches if they have an
effect on the driver) or using the PostScript Level 2
<b><tt>setpagedevice</tt></b> operator if Ghostscript has been compiled
with the <b><tt>level2</tt></b> device (which it should
<b><tt>;-)</tt></b>). There are <b>no</b> special-purpose operators such as
one was able to find in Level 1 printers.
<p>
The bjc uses 24 bits per pixel by default (unless you change the value of
<b><tt>BJC_BITSPERPIXEL</tt></b>), corresponding to CMYK printing.
Supported modes are 1 bpp and 4 bpp (gray levels), 8 bpp, 16 bpp, 24 bpp
and 32 bpp (colours). Colours are preferably stored in the CMYK model
(which means, for example, that with 16 bpp there are only 16 different
shades of each color) but it is possible to store them as RGB color for
some depths. Some modes do Floyd-Steinberg dithering and some don't, but
use the default Ghostscript halftoning (in fact, when halftoning is used,
dithering takes also place but because of the low point density it is
usually not efficient, and thus invisible).
<blockquote><table cellpadding=0 cellspacing=0>
<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Descriptions of printing modes by bpp and <b><tt>Colors</tt></b></font><hr>
<tr valign=bottom>
<th align=left>bpp
<td>
<th align=left><b><tt>Colors</tt></b>
<td>
<th align=left>Mode
<tr> <td colspan=5><hr>
<tr valign=top> <td>32
<td>
<td align=center>4
<td>
<td>CMYK colour printing, Floyd-Steinberg dithering
<tr valign=top> <td>24
<td>
<td align=center>4
<td>
<td>The same. (But each primary colour is stored on 6 bits instead of 8.)
<tr valign=top> <td>24
<td>
<td align=center>3
<td>
<td>RGB colour printing, Floyd-Steinberg dithering. This mode does
<b><tt>not</tt></b> use the black cartridge (that's why it
exists, for when you don't want to use it <b><tt>;-)</tt></b>).
Each primary colour is stored in 8 bits as in the 32/4 mode,
but black generation and under-color removal are done on the
driver side and not by Ghostscript, so you have no control over
it. (This mode is no longer supported in this driver.)
<tr valign=top> <td>16
<td>
<td align=center>4
<td>
<td>CMYK colour printing, halftoned by Ghostscript. F-S dithering
is still visible here (but the halftone patterns are visible
too!).
<tr valign=top> <td>8
<td>
<td align=center>4
<td>
<td>The same. (But each primary colour is stored in 2 bits instead of 4.)
<tr valign=top> <td>8
<td>
<td align=center>3
<td>
<td>RGB colour printing. This mode is not intended for use. What I
mean is that it should be used only if you want to use custom
halftone screens <b>and</b> the halftoning is broken using the
8/4 mode (some versions of Ghostscript have this problem).
<tr valign=top> <td>8
<td>
<td align=center>1
<td>
<td>Gray-level printing, Floyd-Steinberg dithering
<tr valign=top> <td>1
<td>
<td align=center>1
<td>
<td>Gray-level printing halftoned by Ghostscript
</table></blockquote>
<p>
These modes are selected using the <b><tt>BitsPerPixel</tt></b> <b>and</b>
<b><tt>Colors</tt></b> integer options (either from the command line or in
a PostScript program using <b><tt>setpagedevice</tt></b>). See below.
<p>
A note about darkness of what is printed: Canon printers do print dark,
really. And the Floyd-Steinberg dithering may eventually darken your image
too. So you may need to apply gamma correction by calling Ghostscript as in
<blockquote><b><tt>
gs -sDEVICE=bjc600 gamma.ps myfile.ps
</tt></b></blockquote>
<p>
where <b><tt>gamma.ps</tt></b> changes the gamma correction (here to 3 for
all colors); 0.45 gives me good results, but your mileage may vary. The
bigger the value the lighter the output:
<blockquote><b><tt>
{ 0.45 exp } dup dup currenttransfer setcolortransfer
</tt></b></blockquote>
<p>
The drivers support printing at 90dpi, 180dpi and 360dpi. Horizontal and
vertical resolutions must be the same or a limitcheck error will happen. A
rangecheck will happen too if the resolution is not
90 ×2^<small><sup><b>N</b></sup></small>. If the driver
is compiled with <b><tt>-DBJC_STRICT</tt></b> a rangecheck also happens if
the resolution is not one of those supported. This is not the case, as we
expect that there may be a 720dpi bjc some day.
<p>
Here are the various options supported by the bjc drivers, along with
their types, supported values, effects, and usage:
<dl>
<dt><b><tt>BitsPerPixel</tt></b> (int)
<dd>Choose the depth of the page. Valid values are 1, 8, 16, 24 (the
default) and 32.
<p>
Note that when this is set for the first time, the <b><tt>Colors</tt></b>
property is automatically adjusted unless it is also specified. The table
here shows the corresponding color models and the rendering method visible:
"GS" for Ghostscript halftoning and "F-S" for Floyd-Steinberg dithering.
When both are present it means that the dithering of halftones is visible.
Default choices are indicated by asterisk "*".
<blockquote><table cellpadding=0 cellspacing=0>
<tr><th colspan=9 bgcolor="#CCCC00"><hr><font size="+1">Valid <b><tt>Colors</tt></b> values for<br>allowed <b><tt>BitsPerPixel</tt></b> values
</font><hr>
<tr valign=bottom>
<th align=left>bpp
<td>
<th align=left><b><tt>Colors</tt></b>
<td>
<th align=left>
<td>
<th align=left>Color model
<td>
<th align=left>Dithering
<tr> <td colspan=9><hr>
<tr valign=top> <td>32
<td>
<td align=center>4
<td>
<td>
<td align=center>
<td>CMYK
<td>
<td>F-S
<tr valign=top> <td>24
<td>
<td align=center>4
<td>
<td><b>*</b>
<td align=center>
<td>CMYK
<td>
<td>F-S
<tr valign=top> <td>
<td>
<td align=center>3
<td>
<td>
<td align=center>
<td>RGB
<td>
<td>F-S
<tr valign=top> <td>16
<td>
<td align=center>4
<td>
<td>
<td align=center>
<td>CMYK
<td>
<td>GS, F-S
<tr valign=top> <td>8
<td>
<td align=center>4
<td>
<td><b>*</b>
<td align=center>
<td>CMYK
<td>
<td>GS
<tr valign=top> <td>
<td>
<td align=center>3
<td>
<td>
<td align=center>
<td>RGB
<td>
<td>GS
<tr valign=top> <td>
<td>
<td align=center>1
<td>
<td>
<td align=center>
<td>K (CMYK)
<td>
<td>F-S
<tr valign=top> <td>1
<td>
<td align=center>1
<td>
<td><b>*</b>
<td align=center>
<td>K (CMYK)
<td>
<td>GS
</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>BitsPerPixel</tt></b> to a value
whose valid <b><tt>Colors</tt></b> values do not include the actual
<b><tt>Colors</tt></b> value, you must change <b><tt>Colors</tt></b> too.
</dl>
<dl>
<dt><b><tt>Colors</tt></b> (int)
<dd>Choose the number of color components from among 1, 3 and 4 (the
default). This setting cannot be used in a PostScript program, only on
Ghostscript's command line. See <b><tt>ProcessColorModel</tt></b> below
for what to use to change the number of colors with PostScript code.
<p>
Note that setting this property does limit the choices of
<b><tt>BitsPerPixel</tt></b>. As for the previous property, its first
setting may induce a setting of the "other value"
(<b><tt>BitsPerPixel</tt></b> here). The table here indicates valid
combinations with "V", default values with asterisk "*".
<blockquote><table cellpadding=0 cellspacing=0>
<tr><th colspan=13 bgcolor="#CCCC00"><hr><font size="+1">Valid <b><tt>BitsPerPixel</tt></b> values<br>for allowed <b><tt>Colors</tt></b> values</font><hr>
<tr valign=top> <td>
<td>
<td>
<td>
<th align=left colspan=9><b><tt>BitsPerPixel</tt></b> OK values<hr>
<tr valign=top> <th>Colors
<td>
<th>Type
<td>
<td>32
<td>
<td>24
<td>
<td>16
<td>
<td>8
<td>
<td>1
<tr> <td colspan=13><hr>
<tr valign=top> <td>4
<td>
<td>CMYK
<td>
<td><b>V</b>
<td>
<td><b>*</b>
<td>
<td><b>V</b>
<td>
<td><b>V</b>
<td>
<td>
<tr valign=top> <td>3
<td>
<td>RGB
<td>
<td>
<td>
<td><b>*</b>
<td>
<td>
<td>
<td><b>V</b>
<td>
<td>
<tr valign=top> <td>1
<td>
<td>K
<td>
<td>
<td>
<td>
<td>
<td>
<td>
<td><b>V</b>
<td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -