|
|
|
|
Note that a printer capable only of CMY might accept
CMY+K or CMYK data, remapping them to CMY, and a printer
capable of CMY+K might remap CMY data to CMY+K.
|
|
Print Quality Selection for Older
DeskJets |
|
With the introduction of the DeskJet 540, HP added two
new PCL commands to the language: Media Type and Print
Quality. For older DeskJets (500, 500C, 510, 520, 550C and
560C), similar effects can be achieved by specifying some
technical aspects of the printing process in detail.
The hpdj driver accepts only the new Media Type
and Print Quality specifications as options. For printers
not understanding the new commands, these specifications are
mapped to the older Depletion, Shingling, and Raster
Graphics Quality commands based on recommendations from
HP.
|
|
Media Sizes and Orientations |
|
Ghostscript looks at several sources to determine the
page size for a document:
|
|
• the default size set for gs (usually US
Letter or ISO A4)
• the value given to -sPAPERSIZE in the
invocation
• the size requested by the document, unless you
specify -dFIXEDMEDIA |
|
The last applicable item in this list overrides the
others.
The driver knows which media sizes are supported by each
printer model and will refuse to print if an unsupported one
is requested. The model unspec normally accepts all
sizes, and it assumes the printer to understand all size
commands which can be sent to one of the supported
series-800 DeskJets. This can be changed with a margin file
specification; see the CONFIGURATION section below
for details.
Each supported size is available in portrait and
landscape orientation. Media should however always be put
into the input tray independent of the intended orientation.
Ghostscript and hpdj will take care of the rest.
Hewlett-Packard’s information on the required
orientation of media in the input tray is not quite clear,
but hpdj assumes it to be always "short edge
first" with respect to the feeding direction. You
should check your printer’s manual whether this is
correct, in particular if you have a DeskJet 400, 500 or
500C and wish to print on envelopes. Note that hpdj
has no information about the dimension or orientation of the
medium in the input tray: you must ensure yourself that this
is appropriate.
In setting up the PostScript default user space,
hpdj does not treat envelope sizes differently.
|
|
Error messages issued by hpdj start with
"? Device hpdj:", warnings with
"?-W Device hpdj:". Both are written on
the standard error stream.
|
OPTIONS
|
The following options are not specific to the hpdj
device but have specific meaning or restrictions:
|
|
This option specification selects this driver.
|
|
This option specifies the resolution in pixels per inch
(ppi). The driver checks whether the model selected accepts
the given resolution unless the model is unspec.
Resolutions supported by at least some of the models in some
of the colour modes are 75, 100, 150, 300 and 600 ppi. Only
unspec permits unequal horizontal and vertical
resolutions. For this case read the subsection on the
Configure Raster Data command in the LIMITATIONS
section below first. The default resolution for hpdj
is set at compile time, usually to 300 ppi. |
|
The following options are specific to hpdj:
|
|
-dBlackLevels=levels and
-dCMYLevels=levels |
|
Warning! These options are not based on HP
documentation! Read the subsection on the Configure
Raster Data command in the LIMITATIONS section below
before using them.
These options set the number of intensity levels per
pixel and colorant to use when printing with black or CMY
inks, respectively, and must be consistent with the colour
mode. They permit access to the Colour Resolution
Enhancement technology (C-REt) feature available in some
series-800 DeskJets. The defaults are 0 or 2, depending on
the colour mode chosen. Other values are only accepted for
the models 850C, 855C and unspec. I
strongly suggest that you apply gamma correction and modify
the halftone screens whenever you use non-default values for
these options (see the CONFIGURATION section
below).
unspec accepts any non-negative number of levels
except 1 up to 256. The models 850C and 855C
accept the levels 0, 2, 3 and 4 with the following
restrictions if any of the levels is larger than 2: |
|
• You can’t use this feature with draft
quality.
• You can’t use a colour mode of CMY.
• You must use a resolution of 300 ppi.
• If you are using a non-monochrome mode, you must use
4 levels for black. |
|
When using the model unspec you should expect the
printer to similarly limit the possibilities. So far I have
not heard of a PCL-3+ printer supporting more than four
intensity levels per colorant.
Unfortunately, there is a problem here because
ghostscript’s internal colour model is not prepared
for the situation where a device can render different small
(< 32) numbers of intensity levels for different
colorants. In this situation gs will in general
assume that the number of black levels available is equal to
that for CMY levels. Depending on which of the numbers is
smaller, there will then either be unused black levels or
some will be used more than once.
Regrettably, best results on a DeskJet 850C seem to me to
be achieved with 4 black and 3 CMY levels, at least on plain
paper. (4 CMY levels might be right for presentation quality
on glossy paper or transparencies.) The CONFIGURATION
section below presents a slightly dirty path out of this
difficulty.
|
|
-sColorMode=mode or
-sColourMode=mode |
|
This selects the colour mode to be used by the driver:
mono (or monochrome), CMY, CMY+K
or CMYK. The default is mono. Which colour
modes are accepted depends on the model, see Colour
Modes in the section DESCRIPTION above.
A value of CMY for this option also sets
BlackLevels to zero, and if CMYLevels is zero
when you demand any of CMY, CMY+K or
CMYK, it is set to two. For all other situations you
must ensure yourself that colour mode and intensity levels
are consistent or hpdj will complain. This rule
implies that you can ignore the level options unless you
want to use a non-default number of levels.
The PostScript page device dictionary entry
ProcessColorModel will not be correct for a colour
mode of CMY or CMY+K.
|
|
-dCompressionMethod=method |
|
PCL interpreters understand several compression methods
for raster graphics data in order to speed up host-printer
communication. The possible choices are:
0 Unencoded, non-compressed 1 Runlength
encoding 2 Tagged Image File Format (TIFF) 3
Delta Row Compression 9 Compressed Replacement Delta
Row Encoding
The default method is set at compile time, usually to 9.
Requesting method 3 actually leads to a combination of
methods 2 and 3. The DeskJet 500 does not support method 9.
The driver may temporarily choose method 0 if a compressed
data sequence would be longer than its uncompressed
version.
Compression rates can vary drastically, depending on the
structure of the input. However, although the absolute
values change, the relative order of efficiency between the
methods is usually the order of increasing method. In
short: use method 9 (3 for the DeskJet 500).
|
|
With the exception of the DeskJets 500 and 500C, DeskJet
printers can be told to guarantee a minimum drying time of
delay seconds before the next page of the same print
job is dropped on a newly printed page. (This interval can
be terminated by pressing the Load/Eject button.) The
printer will choose default values depending on the current
print quality, hence it is normally not necessary to specify
this option and the feature is even considered obsolete for
newer DeskJets although it is still supported by some of
them.
Permissible values for delay are integers in the
range ?1 to 1200, where ?1
instructs hpdj not to send a corresponding command,
0 establishes default values for the current print
quality, and all other values explicitly request the
duration in seconds. The default is ?1.
|
|
It is possible to request a DeskJet printer to wait
before each page of a document until the Load/Eject button
is pressed on the printer. This is mostly intended for
situations where some special medium is used or the medium
has to be inserted into an input slot holding only one sheet
at a time. The default setting for this option is
false except for series-500 DeskJets printing on
envelope sizes when it is true.
Note that for current ghostscript versions this setting
is independent of the value of the PostScript operator
manualfeed in statusdict. If you want to
set manual feeding from the PostScript code you must
therefore use the ManualFeed entry in the page
device dictionary.
|
|
This option must specify an existing file containing a
list of supported media sizes and corresponding margin
descriptions for the printer. This will take precedence over
the builtin model-specific lists of sizes and margins. The
format of the file is described in the CONFIGURATION
section below. The default is not to use a margin file but
the builtin lists. This option is primarily intended to be
used with the model unspec.
A margin file path can also be specified at compile time
overriding the default behaviour for unspec only.
Using the MarginFile option in addition will override
the compiled-in margin file path.
|
|
This option selects (you guessed it) the type of medium
you wish to print on. The possible choices are: 0 plain
paper 1 bond paper 2 HP Premium paper 3 glossy paper 4
transparency film 5 photo paper
The default is plain paper. For type, you
can specify the full strings, the one-word strings resulting
from dropping "paper", "film", and
"HP", or an integer. Out-of-range numerical values
generate a warning but are passed through to the printer if
it is a model understanding the PCL command "Media
Type". If it isn’t, the effect is the same as
specifying plain paper. The value 5/photo
paper is only understood by some recent DeskJets (e.g.,
the DeskJet 690C) and will be ignored by older ones.
|
|
This option identifies the printer model for which the
generated file is intended. The following names are accepted
for model:
|
|
500, 500C, 510, 520,
540, 550C, 560C, 850C,
855C, unspec. |
|
The choice of model primarily determines which
resolutions, colour modes, intensity levels and media sizes
the driver will accept, where the output will appear on the
page, and to some extent what PCL code the driver will
generate. Some of the models are treated identically. A
default model can be set at compile time. If this has not
been done, you must specify the Model option in every
invocation.
unspec is intended to be a stop-gap for
DeskJet-compatible printers not presently supported by this
driver. For unspec, all model-specific checks (e.g.,
supported resolutions) are turned off. Supported media sizes
and margin settings are assumed to be identical with those
for the DeskJets 850C/855C/870C/890C, but you can use the
MarginFile option or its compile-time equivalent to
override this. The PCL code generated assumes a
"new" DeskJet in the sense that it should be at
least at the level of a DeskJet 540 supporting the PCL
commands Media Type and Print Quality. If you specify
unequal horizontal and vertical resolutions or more than two
levels of intensity per colour and pixel, the printer must
in addition understand the Configure Raster Data command.
Read the subsection on that command in the
LIMITATIONS section below.
If you choose to use unspec it is your
responsibility to ensure that hpdj is only called
with parameter values the printer can handle. This applies
in particular to the resolution and the intensity
levels.
|
|
The pathname must specify either a non-existent
file in a directory with write permission or a writable file
with a single line containing a non-negative integer. In the
first case, hpdj will create the file and insert the
number of pages processed, in the second case the number
will be incremented by that amount. Parallel invocations of
gs are permitted to use the same file. hpdj
will also make the initial page count available in its page
device dictionary. Note that in present ghostscript versions
the PostScript operator pagecount in
statusdict always returns 4711 and is not
based on the value of PageCount in the page device
dictionary.
This option is mainly intended for spooler backends
calling hpdj. It can be used to keep track of the
total number of pages printed and also for per-job
accounting. I recommend using this option for the first
purpose and to make a note of the values in the resulting
files whenever you insert a new ink cartridge. This will
enable you to get an indication of how much a printed page
costs and why it is a good idea to use draft quality
whenever possible.
The driver can be compiled without this option present
but on a UNIX system I would not expect this to be done
unless gs offers the same functionality in a
driver-independent manner which it currently does not.
hpdj is distributed with an example
if-hpdj of a BSD spooler backend using this
option.
|
|
There are three print quality settings:
|
|
The default is normal. You may specify the strings
or an integer. Out-of-range numerical values will generate a
warning but are passed through to the printer if it is a
model understanding the PCL command "Print
Quality". If it isn’t, the effect is the same as
specifying normal.
|
|
Looking up Compile-Time Defaults |
|
Some default values for options can be chosen at compile
time. If you later want to know these values, run gs
on the following PostScript code:
|
|
currentpagedevice
dup /Name get (hpdj) eq not
{
(ERROR: You have not selected the hpdj driver.) =
}
{
(Model: ) print
dup /Model get =
(Resolution: ) print
dup /HWResolution get ==
(Compression method: ) print
dup /CompressionMethod get =
(Margin file: ) print
dup /MarginFile get
dup () eq
{pop (none)} if
=
(PagecountFile is ) print
dup /PagecountFile known not
{(not ) print} if
(supported.) =
} ifelse
pop
quit
|
|
Note that this will not necessarily return the
compile-time defaults but only the values current at the
time of execution. Therefore you should not specify any
options except -sDEVICE=hpdj and, if your ghostscript
executable has been compiled without a default model for
hpdj or if you want to find out whether there is a
compiled-in margin file path, -sModel=unspec. You
should also make sure that you have not set environment
variables modifying ghostscript’s behaviour.
|
CONFIGURATION
|
A margin description file (margin file for short) can be
used to override the builtin model-specific lists of
supported media sizes and the margins in force for each.
This feature is mainly intended to be used in conjunction
with -sModel=unspec: if you have a model not directly
supported by this driver, look up the supported page sizes
and corresponding printable regions in your printer’s
manual and enter them in a margin file.
Note: Entering a page size in the margin file
which is not really supported by your printer is not useful:
the PCL interpreter will simply ignore the request to set
this page size, and printer and driver may have diverging
opinions about what the margins will be. If you need to
print on a medium of a size not supported by your printer,
choose a larger and printer-supported size in PostScript or
via -dFIXEDMEDIA, shift the image if necessary,
establish properly-positioned clipping regions within the
real size, and print. However, if you have a newer DeskJet
supporting custom page sizes, this is not necessary (see
below).
Margin specifications are important for two reasons: the
values for the left and top margins determine how the output
is positioned on the page, and sufficiently large values for
the right and bottom margins prevent the print head being
caught at the paper’s edge and printing beyond the
sheet, respectively. Because DeskJet printers often have an
inconveniently large bottom margin (usually 0.4?0.8
inches or 10?20 mm), one might be tempted to specify
smaller values than listed in the printer’s manual.
However, one user reported that this led to the printer
depositing a large wet blob of black ink at the bottom of
the page. Specifying a smaller margin on the right is in
contrast probably harmless because, according to HP, DeskJet
printers always clip at that margin.
A line in the margin file can be blank, a comment line
(first non-blank character is ’#’), or
one of the following:
|
|
unit unit
code left bottom right top |
|
A unit line specifies in which units margin
specifications in the following lines should be interpreted.
unit can be either in or mm with
in being the default. A unit specification remains
in force until overridden by a following unit
line.
The second kind of line states that the model supports a
particular page size, identified by its PCL page size
code, and specifies the margins in force for that
size when printing in black, in raster graphics mode, and in
portrait orientation for the medium (width ? height). Be
careful with envelopes: older (pre-1997) HP documentation
frequently gives their margins in landscape orientation; you
can check this by looking for the largest margin value: in
portrait orientation it should be at the bottom. The margins
have to be specified as floating point numbers in inches or
millimetres as announced by the last preceding unit
line. The floating point format is that of the "C"
locale. Depending on the model, hpdj will either
assume that the same margins apply for colour printing (this
is the case for unspec) or increase the bottom margin
by a model-specific amount in that case.
The code must be one of the following PCL page
size codes (entries marked with an asterisk are those used
by the model unspec if no margin file is
employed): |
|
|