'\" t
...\" $Header: /cvsroot/espgs/espgs/pcl3/doc/gs-pcl3.1,v 1.1 2002/07/12 16:11:41 tillkamppeter Exp $
...\"
...\"	transcript compatibility for postscript use.
...\"
...\"	synopsis:  .P! <file.ps>
...\"
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl			\" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl			\" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie     \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie     !\\*(f4 \{\
.	ft \\*(f4
.	ds f4\"
'	br \}
.el .ie !\\*(f3 \{\
.	ft \\*(f3
.	ds f3\"
'	br \}
.el .ie !\\*(f2 \{\
.	ft \\*(f2
.	ds f2\"
'	br \}
.el .ie !\\*(f1 \{\
.	ft \\*(f1
.	ds f1\"
'	br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH "GS-PCL3" "1" "" "pcl3 3.3"
.SH "NAME"
pcl3 \(em ghostscript device driver for printers understanding PCL 3+
.SH "SYNOPSIS"
.PP
\fBgs\fP -sDEVICE=pcl3  [\fIgs_option\fP  | -dBlackLevels=\fIinteger\fP  | -dCMYLevels=\fIinteger\fP  | -sColorModel=\fImodel\fP  | -sColourModel=\fImodel\fP  | -dCompressionMethod=\fImethod\fP  | -dConfigureEveryPage  | -dCUPSAccounting  | -dCUPSMessages  | -dDepletion=\fIdepletion\fP  | -dDryTime=\fIseconds\fP  | -sDuplexCapability=\fIcapability\fP  | -sIntensityRendering=\fImethod\fP  | -dLeadingEdge=\fIedge\fP  | -dManualFeed  | -sMediaConfigurationFile=\fIpathname\fP  | -dMediaPosition=\fIposition\fP  | -sMedium=\fImedium\fP  | -dOnlyCRD  | -sPageCountFile=\fIpathname\fP  | -sPCLInit1=\fIstring\fP  | -sPCLInit2=\fIstring\fP  | -sPJLJob=\fIjobname\fP  | -sPJLLanguage=\fIlanguage\fP  | -sPrintQuality=\fIquality\fP  | -dRasterGraphicsQuality=\fIquality\fP  | -dSendBlackLast  | -dSendNULs=\fInumber\fP  | -dShingling=\fIshingling\fP  | -sSubdevice=\fIsubdevice\fP  | -dTumble  | -dUseCard=\fIvalue\fP ]  \&... [\fIfile\fP \&...] 
.SH "DESCRIPTION"
.SS "Supported Printers"
.PP
The ghostscript device driver \fBpcl3\fP
(formerly called \fBhpdj\fP)
is a ghostscript backend for printers understanding
Hewlett-Packard\&'s Printer Command Language, level 3+
("PCL 3+", also called "PCL 3 Plus")\&.
The driver is intended to support in particular the following printer models:
.RS
.PP
.nf
HP DeskJet
HP DeskJet Plus
HP DeskJet Portable
HP DeskJet 310
HP DeskJet 320
HP DeskJet 340
HP DeskJet 400
HP DeskJet 500
HP DeskJet 500C
HP DeskJet 510
HP DeskJet 520
HP DeskJet 540
HP DeskJet 550C
HP DeskJet 560C
HP DeskJet 600
HP DeskJet 660C
HP DeskJet 670C
HP DeskJet 680C
HP DeskJet 690C
HP DeskJet 850C
HP DeskJet 855C
HP DeskJet 870C
HP DeskJet 890C
HP DeskJet 1120C
.fi
.RE

The PCL dialect called "PCL Level 3 enhanced" is apparently a not
entirely compatible modification of PCL 3+\&.
This driver should basically work with such printers
but you must be more careful which options you select and
you might not be able to exploit all your printer\&'s capabilities\&.
.PP
The driver does \fInot\fP support printers understanding only
Hewlett-Packard\&'s PPA (Printing Performance Architecture) commands\&.
If a printer\&'s documentation does not say anything about its
printer command language and
you find a statement like "\&.\&.\&. is designed for Microsoft Windows" or
"DOS support through Windows only",
the printer is almost certainly a PPA printer and hence is intended
\fIexclusively\fP
for systems running Microsoft Windows\&.
(These printers are also erroneously known as "GDI printers"
because they are intended to be accessed through a manufacturer-supplied driver
via Windows\&' GDI interface\&.)
There exist ways of using a PPA printer with ghostscript,
but not through \fBpcl3\fP\&.
.PP
Different printer models usually implement model-specific subsets of all
PCL-3+ commands or arguments to commands\&.
You must therefore tell the driver by means of the
\fBSubdevice\fP
option for which model the generated PCL code is intended\&.
The model-dependent difference in the generated code is not great\&.
Apart from media specifications, resolutions and colour capabilities,
one can consider three groups of models
which are treated with significant differences:
.RS
.IP "Group 1" 10
DeskJet, DeskJet Plus, DeskJet 500
.IP "Group 2" 10
DeskJet Portable, DeskJets 3\fIxx\fP,
400, 5\fIxx\fP except 500 and 540,
.IP "Group 3" 10
DeskJets 540, 6\fIxx\fP,
8\fIxx\fP and 1120C\&.
.RE

The first two groups I call the "old Deskjets",
the third group consists of "new DeskJets"\&.
If you have a PCL-3 printer not appearing in the list above,
the likelihood is still good that it will accept the files generated by
\fBpcl3\fP\&.
You can specify one of the supported subdevices in these cases
(it is sufficient to try one each from the groups just mentioned),
or use the special subdevice names
\fBunspecold\fP or \fBunspec\fP
which are treated like members of the second and the third group above,
respectively,
with all subdevice-dependent checks having been turned off\&.
.PP
The list of printer models for which this driver is currently known to work is:
.RS
.PP
.nf
HP 2000C
HP 2500CM
HP DeskJet 697C
HP DeskJet 850C
HP DeskJet 970C
HP DeskJet 1100C
Xerox DocuPrint M750
.fi
.RE
.PP
Details can be found in the file \fBreports\&.txt\fP in the
\fBpcl3\fP distribution;
its latest version is available via \fBpcl3\fP\&'s
\fIhome
page (link to URL http://home.t-online.de/home/Martin.Lottermoser/pcl3.html) \fR\&.
If you wish to report on the hardware compatibility for a particular
printer model,
please read the file \fBhow-to-report\&.txt\fP\&.
.PP
Omitting models already mentioned,
previous (\fBhpdj\fP) versions of this driver were reported to
work with the following printers:
.RS
.PP
.nf
HP DeskJet 340
HP DeskJet 400 (tested for Gray only)
HP DeskJet 420
HP DeskJet 500
HP DeskJet 500C (tested for Gray only)
HP DeskJet 520
HP DeskJet 540
HP DeskJet 560C
HP DeskJet 600
HP DeskJet 610C
HP DeskJet 612C		
HP DeskJet 640C		
HP DeskJet 660C/660Cse
HP DeskJet 670C
HP DeskJet 672C
HP DeskJet 680C
HP DeskJet 690C
HP DeskJet 690C+
HP DeskJet 693C
HP DeskJet 694C
HP DeskJet 832C
HP DeskJet 855C
HP DeskJet 870Cse/870Cxi
HP DeskJet 880C
HP DeskJet 890C
HP DeskJet 895Cse/895Cxi
HP DeskJet 932C		
HP DeskJet 1120C
HP OfficeJet 350	
HP OfficeJet 590
HP OfficeJet 600
HP OfficeJet 625
HP OfficeJet G55	
HP OfficeJet T45	
Lexmark 3000 Color Jetprinter
Olivetti JP792 (see the option \fBSendBlackLast\fP)
.fi
.RE
.PP
Most of the people who sent me reports did not state to which extent
\fBhpdj\fP worked for their printer model\&.
.SS "Colour Models"
.PP
Ignoring photo cartridges which are not supported by \fBpcl3\fP,
DeskJet printers can be classified in four categories:
.IP "   \(bu" 6
The printer has only a black ink cartridge\&.
.IP "   \(bu" 6
The printer can print with either a black or a
cyan/magenta/yellow (CMY) cartridge\&.
.IP "   \(bu" 6
The printer holds a CMY and a black cartridge simultaneously,
but the two groups of inks are chemically incompatible and should not be
overlayed\&.
(Don\&'t worry: the printer is not going to explode if they do\&.
You merely get poorer results because the black ink will spread further
than it should\&.
This is called "ink bleeding"\&.)
.IP "   \(bu" 6
The printer holds a CMY and a black cartridge simultaneously
and the inks can be mixed\&.
(Newer HP DeskJets use such bleed-proof inks\&.)
.PP
This leads to four \fI(process) colour models\fR
for the driver:
.PP
.RS
.IP "Gray" 10
Print in black only\&.
.IP "CMY" 10
Print with cyan, magenta and yellow\&.
In this mode, "composite black" consisting of all three inks is used to
stand in for true black\&.
.IP "CMY+K" 10
Print with all four inks, but never mix black with one of the others\&.
.IP "CMYK" 10
Print with all four inks\&.
.RE

As a printer with both, a black and a CMY cartridge, can usually also print,
e\&.g\&., with black only,
the printer\&'s "cartridge state" merely identifies one of these models as the
maximal one\&.
Depending on the category of the printer,
the driver will therefore accept one or more models\&.
The possibilities are:
.PP
.RS
.TS
tab();
l l.
DeskJet ModelColour Models
_
T{
DeskJet, DeskJet Plus, DeskJet Portable, 500, 510, 520
T}Gray
310, 320, 340, 400, 500C, 540, 600Gray, CMY
550C, 560CGray, CMY, CMY+K
T{
660C, 670C, 680C, 690C, 850C, 855C, 870C, 890C, 1120C
T}all
.TE
.RE

The subdevices \fBunspecold\fP and
\fBunspec\fP also permit all colour models\&.
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\&.
.PP
The colour model CMY+K is not useful if you have a CMYK printer\&.
In contrast,
if you have a CMY+K or CMYK printer and the two cartridges support different
resolutions,
the colour models Gray or CMY become interesting as well\&.
In most of these cases
the black cartridge can print at a higher resolution than the CMY cartridge,
although the converse does also occur\&.
In addition, ghostscript is generally fastest for Gray\&.
.PP
PCL\ 3+ also supports the colour model RGB
although Hewlett-Packard discourages its use\&.
For this model the printer internally converts the RGB data it receives into
CMY data for printing\&.
Note that not everything which can be demanded when using a CMY palette
in PCL\ 3+ is also permitted when using RGB\&.
Because of its limited usefulness,
\fBpcl3\fP accepts the colour model RGB only for the subdevices
\fBunspecold\fP and \fBunspec\fP\&.
.SS "Media Sizes and Orientations"
.PP
A PostScript document describes its visible content with respect to
a coordinate system called \fIdefault user space\fR\&.
Almost all PostScript devices are \fIpage devices\fR which
paint only a restricted rectangular area in default user space\&.
Part of the state of a page device is therefore the current
\fIpage size\fR,
two numbers specifying the width and height of the sheet to be printed on\&.
These values must be interpreted from default user space,
hence the page size not only describes the
"sheet size" (extension irrespective of orientation) but also the
orientation between page contents and sheet
(portrait if width \(<= height, landscape otherwise)\&.
The page size is requested by the user or the document,
and it is one of the jobs of the device to satisfy this request\&.
.PP
Ghostscript looks at several sources to determine the page size:
.IP "   \(bu" 6
the default size configured for \fBgs\fP
(usually US Letter or ISO A4 in portrait orientation),
.IP "   \(bu" 6
the value given to the option \fBPAPERSIZE\fP in the
invocation,
.IP "   \(bu" 6
the size requested by the document, unless you specify
\fB-dFIXEDMEDIA\fP\&.
.PP
The last applicable item in this list overrides the others,
hence the current page size can change at runtime\&.
.PP
The \fBpcl3\fP driver splits the page size into sheet size and
page orientation and passes the sheet size to the printer\&.
This works only if the printer accepts this size
(accepted sizes are listed in your printer\&'s manual)\&.
For the explicitly supported printers,
the driver knows which sizes are accepted
and will refuse to print if an unsupported one is requested\&.
(If you suspect that \fBpcl3\fP is in error concerning what is
supported,
check the list of supported sizes in the PPD file for the subdevice you are
using\&.)
Group-3 printers also accept a \fIcustom page size\fR command
which permits printing on arbitrarily-sized media
but only within certain limits which are also known to the driver\&.
Unlike the sheet size the page orientation is irrelevant for deciding whether
a particular page size is supported or not\&.
The driver will adapt itself as required by the
PostScript language and rotate the output if necessary\&.
(I know of only one other ghostscript driver capable of this\&.)
.PP
In setting up the PostScript default user space,
\fBpcl3\fP
does not treat envelope sizes differently from other sizes\&.
.PP
The subdevice \fBunspecold\fP accepts all sizes supported by
the HP DeskJet 560C,
\fBunspec\fP supports all discrete sizes known to the
HP DeskJets 850C/855C/870C/890C and
treats in addition every other size request as a custom page size
without imposing any limits\&.
If using any of these two subdevices you should change the list of supported
sizes to fit your printer\&'s capabilities;
see the
\fI\fICONFIGURATION\fP\fR
section below for details\&.
.PP
In order for a document to be printed correctly
a sheet of appropriate size must be provided and the driver must know
what its orientation with respect to the printing mechanism is\&.
The latter is usually specified by reference to the feeding direction as
"short edge first" or "long edge first"\&.
Don\&'t confuse this kind of orientation with the portrait/landscape
orientation:
the former ("sheet orientation") refers to the orientation of the sheet
with respect to the feeding direction,
the latter ("page orientation") describes the orientation of the sheet with
respect to the page contents (default user space)\&.
These orientations are logically independent:
people inserting paper into the printer need to know about the first,
people composing documents only care about the latter\&.
.PP
Because \fBpcl3\fP
has no information about the actual dimension or orientation of the medium
in the input tray,
you must ensure yourself that this is appropriate\&.
By default, the driver assumes the dimension to be that requested via the
page size,
but you can override this assumption with an \fBInputAttributes\fP
definition (see the
\fI\fIMedia Sources and Destinations\fP\fR
subsection in the \fICONFIGURATION\fP section below)\&.
.PP
There is no command in PCL\ 3+ to tell the printer about the
sheet\&'s orientation in the input tray,
therefore it cannot be chosen and the manufacturer must prescribe it\&.
I am not aware of any precise and complete statement from Hewlett-Packard
about what is required in this respect,
hence you should check your printer\&'s manual whether the assumptions made by
\fBpcl3\fP are correct or not:
the driver assumes that media are always fed short edge first except when
using the subdevices
\fBhpdj\fP,
\fBhpdjplus\fP,
\fBhpdj400\fP,
\fBhpdj500\fP
or
\fBhpdj500c\fP
for printing on envelope sizes
(US no\&. 10 and ISO DL)\&.
In these cases you should insert the medium long edge first\&.
If you find that \fBpcl3\fP\&'s default behaviour is incorrect,
you can override it with the option \fBLeadingEdge\fP
or a media configuration file
(see the
\fI\fICONFIGURATION\fP\fR
section below)\&.
.SS "Print Quality and Media Properties"
.PP
With the introduction of the DeskJet 540, HP added two new PCL commands to the
language: "Print Quality" and "Media Type"\&.
For older DeskJets (groups 1 and 2), similar effects can be
achieved by specifying some technical aspects of the printing process in detail\&.
.PP
You can use the \fBPrintQuality\fP and
\fBMedium\fP options to adapt the driver to the desired
output quality and those properties of the medium it must know about,
independent of which kind of subdevice you select\&.
If it corresponds to a printer understanding the new commands,
the option values are passed through to the printer,
otherwise these specifications are
mapped to the older Depletion, Shingling, and Raster Graphics Quality commands
based on recommendations from HP\&.
If you are not satisfied with the result in the latter case,
use the options \fBDepletion\fP,
\fBShingling\fP and
\fBRasterGraphicsQuality\fP
to explicitly set these values\&.
.SS "Diagnostic Messages"
.PP
Error messages issued by this driver start with
"\f(CW? \fIcomponent\fP:\fR"
and warnings with
"\f(CW?-W \fIcomponent\fP:\fR"\&.
The \fIcomponent\fP can be
\f(CWeprn\fR,
\f(CWpcl3\fR, or
\f(CWpclgen\fR,
corresponding to the driver\&'s three internal layers:
the \fBeprn\fP device extends ghostscript without knowing PCL,
\fBpclgen\fP is a module generating PCL without being aware of
ghostscript,
and \fBpcl3\fP is the driver proper connecting the other two
layers\&.
.PP
All these messages are written on the standard error stream\&.
.SH "OPTIONS"
.PP
When specifying options for \fBgs\fP you should keep in mind
that
case is significant,
that some options must be passed as strings (\fB-s\fP)
and others as general tokens (\fB-d\fP),
and that \fBgs\fP
effectively ignores every option it does not recognize\&.
Hence some care in spelling parameter names is necessary\&.
.PP
If you are confused by the large number of options, don\&'t worry\&.
Just ignore those you don\&'t understand and
concentrate first on the following ones,
given here in the order of their importance:
\fB-sDEVICE\fP,
\fB-sSubdevice\fP,
\fB-sColourModel\fP,
\fB-r\fP,
\fB-sPrintQuality\fP,
and
\fB-sMedium\fP\&.
You should also check whether there is an entry in the
\fBreports\&.txt\fP file
in the \fBpcl3\fP distribution
listing working option combinations for your printer\&.
.SS "Standard Options"
.PP
When calling \fBgs\fP with the \fBpcl3\fP driver 
you can specify any option defined for ghostscript\&'s
\fBprn\fP
(printer) device although some have particular meanings or restrictions\&.
This includes all device-independent options described in
\fBgs\fP\fB(1)\fP\&.
You should also look into ghostscript\&'s extended documentation
(file \fI\fBUse\&.htm\fP (link to URL Use.htm) \fR and the section
\fI\fIDevice
parameters\fP (link to URL Language.htm#Device_parameters) \fR
in \fBLanguage\&.htm\fP)\&.
.IP "\fB-sDEVICE=pcl3\fP" 10
This specification selects the \fBpcl3\fP
driver,
but this is not the only way to select it with this option\&.
See the description of the \fBSubdevice\fP option below for other
possibilities\&.
.IP "\fB-dDuplex[=\fIboolean\fP]\fP or \fB-dDuplex=null\fP" 10
This parameter requests duplex printing and can be set to
\fBtrue\fP only for \fBunspec\fP and
\fBunspecold\fP,
and when the
\fBDuplexCapability\fP value is not \fBnone\fP\&.
The default is \fBnull\fP
which for this driver means that the printer\&'s default setting will be used\&.
.IP "" 10
If your printer does not support duplex printing you can achieve the same
effect manually by printing the odd and even pages separately
(use a command like \fBpsselect\fP\fB(1)\fP from the psutils package for extracting these parts)
and reinserting the paper in between\&.
.IP "\fB-r \fIresolution\fP\fP" 10
This option specifies the resolution in
pixels per inch (ppi; sometimes also called dots per inch, dpi)\&.
The driver checks whether the subdevice selected accepts the given
resolution unless the subdevice is \fBunspecold\fP or
\fBunspec\fP\&.
Resolutions supported by at least some of the other subdevices
for some of the colour models are 75, 100, 150, 300, 600×300 and 600 ppi\&.
Consult the PPD files in the \fBpcl3\fP distribution if you want
to know the details\&.
The default resolution for \fBpcl3\fP is 300 ppi\&.
.IP "" 10
At least the highest possible value should be listed in your printer\&'s manual,
but some care is necessary in the interpretation:
the value given to \fBpcl3\fP must be a resolution supported by
the printer\&'s hardware for all the colorants in the process colour model
simultaneously and when operating in raster graphics mode\&.
You should also keep in mind that if your printer has two cartridges
they might support different sets of resolutions,
i\&.e\&., which resolution you can choose might depend on the colour model\&.
It is also possible that the print quality has to be considered as well\&.
If you are in doubt and have access to a manufacturer-endorsed driver for your
printer,
use \fBpcl3opts\fP to find out about the settings used by that
driver\&.
.IP "" 10
At least some of the series-500 DeskJets claim to
permit a resolution of 600 × 300 ppi\&.
However,
although these models have a 600 dpi addressable horizontal resolution grid
they do not permit neighbouring pixels to be activated
(and the dots printed still have a diameter of about 1/300 in)\&.
The raster data generated by
\fBgs\fP
does not obey this restriction\&.
In addition, it is possible that the higher resolution is anyway only supported
for the printer\&'s builtin fonts and not for general raster data\&.
.IP "" 10
Concerning the DeskJet 870C,
my impression is that although some HP documents and drivers use expressions
like "600x300 dpi C-REt color" for this printer,
the model does not really support a resolution of 600 × 300 ppi\&.
First, it does not accept \fBpcl3\fP\&'s output with this resolution,
and second,
if one inspects the best output of HP\&'s Windows driver for this printer
with \fBpcl3opts\fP,
one finds that the file uses a "mixed resolution",
i\&.e\&., 600 ppi for black and 300 ppi for CMY\&.
This is not supported by \fBpcl3\fP\&.
.SS "\fBPcl3\fP-Specific Options"
.IP "\fB-dBlackLevels=\fIlevels\fP\fP and \fB-dCMYLevels=\fIlevels\fP\fP" 10
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 model\&.
They permit access to the printer\&'s
Colour Resolution Enhancement technology (C-REt) feature\&.
The defaults are 0 or 2, depending on the colour model chosen\&.
Other values are only accepted for the subdevices
\fBhpdj8\fInn\fPc\fR,
\fBhpdj1120c\fP
and \fBunspec\fP,
and when not using the colour model \fBRGB\fP\&.
.IP "" 10
The subdevice \fBunspec\fP
accepts any non-negative number of levels except 1 up to 256\&.
The subdevices \fBhpdj8\fInn\fPc\fR
and \fBhpdj1120c\fR accept the
\fIlevels\fP 0, 2, 3 and 4
with the following restrictions if any of the levels is larger than 2
(these restrictions have been determined experimentally with a
DeskJet 850C and are not based on HP documentation):
.RS
.IP "   \(bu" 6
You can\&'t use this feature with draft quality\&.
.IP "   \(bu" 6
You can\&'t use a colour model of \fBCMY\fP\&.
.IP "   \(bu" 6
You must use a resolution of 300 ppi\&.
.IP "   \(bu" 6
You must use 4 levels for black\&.
.RE
.IP "" 10
When using the subdevice \fBunspec\fP
you should expect the printer to similarly limit the possibilities\&.
In particular you must expect the permitted number of levels to depend on
colour model, resolution and print quality\&.
So far I have not heard of a PCL-3+ printer supporting more than
four intensity levels per colorant\&.
.IP "\fB-sColorModel=\fImodel\fP\fP or \fB-sColourModel=\fImodel\fP\fP" 10
This selects the colour model to be used by the driver:
\fBGray\fP,
\fBRGB\fP,
\fBCMY\fP, \fBCMY+K\fP or
\fBCMYK\fP\&.
The default is \fBGray\fP\&.
Which colour models are accepted depends on the subdevice, see
\fI\fIColour Models\fP\fR
in the section \fIDESCRIPTION\fP above\&.
.IP "" 10
A value of \fBCMY\fP for this option also sets
\fBBlackLevels\fP to zero,
and if
\fBCMYLevels\fP
is zero when you demand any of \fBCMY\fP,
\fBCMY+K\fP or \fBCMYK\fP,
it is set to two\&.
For \fBRGB\fP, effectively the same happens as for
\fBCMY\fP\&.
For all other situations you must ensure yourself that colour model and
intensity levels are consistent or \fBpcl3\fP will complain\&.
This rule implies that you can ignore the level options unless you
want to use a non-default number of levels\&.
.IP "" 10
The PostScript page device dictionary entry
\fBProcessColorModel\fP will not be correct for a colour model of
\fBCMY\fP or \fBCMY+K\fP\&.
(Ghostscript returns the native colour space in this parameter,
not the process colour model\&.)
.IP "\fB-dCompressionMethod=\fImethod\fP\fP" 10
PCL interpreters understand several compression methods for raster graphics
data in order to speed up host-printer communication\&.
The possible choices are:

.TS
tab();
l l.
\fB0\fPUnencoded, non-compressed
\fB1\fPRunlength encoding
\fB2\fPT{
Tagged Image File Format (TIFF) revision 4\&.0 "Packbits" encoding 
T}
\fB3\fPDelta Row Compression
\fB9\fPT{
Compressed Replacement Delta Row Encoding
T}
.TE

The default method is 9 except for the subdevices
\fBhpdj\fP,
\fBhpdjplus\fP, and
\fBhpdj500\fP where it is 3
(these printers do not support method\ 9),
and for the subdevices \fBunspec\fP and
\fBunspecold\fP where it is 2
(this seems to give the best combination of portability and compression)\&.
Requesting method 3 actually leads to a combination of methods 2 and\ 3\&.
The driver may temporarily choose method 0 if a compressed data sequence would
be longer than its uncompressed version\&.
.IP "" 10
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
\fImethod\fP\&.
In short: use method 9 if it is supported\&.
.IP "\fB-dConfigureEveryPage[=\fIboolean\fP]\fP" 10
This parameter, if set to true, will force the printer to be reconfigured for
every page\&.
The option is superfluous for printers which are truly PCL-3-conforming\&.
.IP "" 10
Use this parameter if you discover that you can print single-page documents
without problems but that the printer does not accept multi-page files\&.
At present, the only printer I know of for which such a reconfiguration is
needed is the Xerox DocuPrint\ M750\&.
.IP "\fB-dCUPSAccounting[=\fIboolean\fP]\fP" 10
You will usually specify this parameter when using \fBpcl3\fP as
the final component in a CUPS (Common UNIX Printing System) driver\&.
It will lead to appropriate page accounting messages on standard error\&.
The default for this parameter is \fBfalse\fP\&.
.IP "" 10
If you have set this parameter to \fBtrue\fP you can\&'t set
it back to \fBfalse\fP\&.
The driver will generate a warning if this is attempted\&.
.IP "" 10
When using \fBpcl3\fP within CUPS you will normally set both,
\fBCUPSAccounting\fP and \fBCUPSMessages\fP\&.
There exist, however, CUPS configurations where page accounting messages should
be generated by a command further down the print pipeline than
\fBpcl3\fP
(e\&.g\&., by a CUPS backend capable of processing PJL Page Status messages
and driving a printer which sends them)\&.
In these cases you should not specify \fB-dCUPSAccounting\fP\&.
.IP "\fB-dCUPSMessages[=\fIboolean\fP]\fP" 10
Specify this parameter when using \fBpcl3\fP as a
component in a CUPS (Common UNIX Printing System) driver\&.
It will modify the format of error messages and warnings as expected by CUPS\&.
The default for this parameter is \fBfalse\fP\&.
.IP "\fB-dDepletion=\fIdepletion\fP\fP" 10
This option is only available for old DeskJets
(including \fBunspecold\fP)
and when printing in colour\&.
The integer \fIdepletion\fP controls an algorithm for
removing certain pixels from the image;
this leads to less ink being applied to the medium\&.
The possible values for \fIdepletion\fP are:

.TS
tab();
r l.
\fB1\fPNo depletion
\fB2\fP25%
\fB3\fP50%
\fB4\fP25% with gamma correction
\fB5\fP50% with gamma correction
.TE

The default value is derived from
\fBMedium\fP and \fBPrintQuality\fP\&.
The values 4 and 5 are not understood by the DeskJet 500C,
but even for the other printers these values are not useful because PostScript
permits finer control for gamma correction through transfer functions
(see the subsection
\fI\fITransfer Functions\fP\fR
in the next section)\&.
.IP "\fB-dDryTime=\fIdelay\fP\fP" 10
With the exception of the DeskJets 500 and 500C,
series-500 DeskJet printers can be told to guarantee a minimum drying time of
\fIdelay\fP
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 post-series-500 DeskJets
although it is still supported by some of them\&.
.IP "" 10
Permissible values for
\fIdelay\fP
are \fBnull\fP and
integers in the range \fB0\fP
to \fB1200\fP,
where
\fBnull\fP
instructs
\fBpcl3\fP
not to send a corresponding command,
\fB0\fP
establishes default values for the current print quality,
and all other values explicitly request the duration in seconds\&.
The default is \fBnull\fP\&.
.IP "\fB-sDuplexCapability=\fIcapability\fP\fP" 10
Looking at the final result (sheet printed),
there are two kinds of duplex printing identified by the two possible values
for the option \fBTumble\fP\&.
Not all printers capable of duplex printing, however, provide the hardware
support necessary for both,
hence the driver must be told what the printer offers in order to be able to
compensate for the missing functionality\&.
The parameter \fB\fIcapability\fP\fR
can be any of the following:

.TS
tab();
l l.
\fBnone\fPno duplex capability
\fBsameLeadingEdge\fPT{
second pass of sheet occurs with the same leading edge
T}
\fBoppositeLeadingEdge\fPT{
second pass of sheet occurs with the opposite leading edge
T}
\fBboth\fPT{
second pass of sheet can occur with either edge
T}
.TE

This option can only be specified for
\fBunspecold\fP and \fBunspec\fP\&.
The default value is \fBnone\fP\&.
.IP "" 10
The correct setting for the HP DeskJet 970C is
\fBoppositeLeadingEdge\fP,
but the printer permits access to its duplex functionality only if you specify
in addition
\fB-sPJLLanguage=PCL3GUI -dOnlyCRD\fP\&.
(Many thanks to Dawei W\&. Dong for an extensive series of experiments\&.)
.IP "" 10
If a printer does not offer hardware support for both orientations,
the document to be printed must execute \fBshowpage\fP after a
possible page-level \fBrestore\fP and not before,
otherwise the driver will not be able to compensate for the missing
functionality
and only one of the two \fBTumble\fP values will work\&.
All DSC-3\&.0-conforming PostScript files have the required property\&.
.IP "\fB-sIntensityRendering=\fImethod\fP\fP" 10
Most printers,
including every PCL-3+ printer I know of,
can render only a small number of intensities per pixel and colorant\&.
In the most frequent case, merely two levels are possible\&.
As this is usually not sufficient,
various methods have been devised to achieve a larger palette;
this is possible at the expense of spatial resolution\&.
Because of this tradeoff between effective resolution and the number of
colours which can be distinguished,
the best method for a given document depends on the contents of the document
and the user should therefore be able to select it\&.
.IP "" 10
The \fBpcl3\fP driver supports the following
\fImethods\fP for intensity
rendering:

.TS
tab();
l l.
\fBprinter\fPT{
use the printer\&'s capabilities directly
T}
\fBhalftones\fPT{
use ghostscript\&'s halftoning implementation
T}
\fBFloyd-Steinberg\fPuse Floyd-Steinberg error diffusion
.TE

The default method is \fBhalftones\fP\&.
The methods differ only in their treatment of intensities which cannot be
represented directly by the printer\&.
If your document contains for example only black text,
they all produce the same result, albeit at different speeds\&.
.IP "" 10
With \fBprinter\fP,
\fBpcl3\fP will cause everything to be painted
at the full hardware resolution but will have to map all colours to the nearest
levels the printer can represent directly\&.
For a CMY or CMYK printer with two intensity levels,
this results in just 8 useful colours per pixel\&.
This value is therefore usually only sensible for documents with a small number
of widely different saturated colours
where accurate colour reproduction is of minor importance but
achieving the highest possible resolution is essential\&.
Another possible application is the case of PostScript input which has already
been adapted to the printer\&'s resolution and available intensity levels\&.
.IP "" 10
With \fBhalftones\fP,
ghostscript will use what looks like standard PostScript halftoning algorithms\&.
For details, consult a PostScript manual\&.
However, you should know that ghostscript\&'s current halftoning
implementation has some problems:
.RS
.IP "   \(bu" 6
The algorithm cannot handle different non-zero values for
\fBBlackLevels\fP and \fBCMYLevels\fP\&.
In this situation \fBgs\fP 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\&.
.IP "   \(bu" 6
When you are using values larger than 2 for \fBBlackLevels\fP or
\fBCMYLevels\fP,
ghostscript does not discover by itself that it could now achieve the same
number of shades with smaller halftone cells\&.
.IP "   \(bu" 6
Most of the ways of increasing the halftone screen frequency seem to fail\&.
I\ have been successful only with the somewhat pedestrian approach of
using threshold arrays,
and even that worked only for some cases\&.
.IP "   \(bu" 6
For particular CMYK values and with ghostscript version\ 6 or higher,
the colour becomes drastically wrong\&.
One example is CMYK = (0\&.99998472, 0\&.002549, 0, 0\&.00367827);
this should be almost a pure cyan but is instead displayed as a sort of pink\&.
If one subtracts one unit in the last position for any of the non-zero
components,
the result becomes acceptable\&.
The problem has not been observed with ghostscript\ 5\&.50\&.
.IP "   \(bu" 6
For ghostscript versions up to and including 5\&.50,
if you are using the colour model \fBCMYK\fP
and more than 2 black levels you should not set merely a single halftone screen
(\fBsetscreen\fP, a type-1 or a type-3 halftone dictionary)
because
ghostscript\&'s dithering routine can in this case return non-monotonic levels of
black for monotonic input intensities\&.
However, if you specify independent halftone information for the colour
components,
\fBgs\fP
uses a slower but more accurate algorithm instead which does not lead to the
wrong behaviour\&.
It is not necessary for the halftone information to be different for different
components to achieve this\&.
Note that ghostscript installs separate halftone screens for CMYK devices by
default if the resolution is at least 150 ppi\&.
.RE
.IP "" 10
Whenever you modify the halftone screens you should therefore use a test file
like
\fBlevels-test\&.ps\fP in the \fBpcl3\fP distribution
to check whether you obtain the desired result\&.
In particular,
you should count the number of intensities you can distinguish
for a single colorant:
if it is obviously not one plus
the number of pixels in the halftone cell times
one less than the number of hardware intensity levels,
something has gone wrong\&.
This is, for example, the case if
you specified 4 black levels and a 2×2 halftone cell,
and you then can distinguish more than 1 + 4×3 = 13 intensity levels\&.
You should also watch for non-monotonic jumps in intensity and incompletely
filled shapes\&.
.IP "" 10
The value \fBFloyd-Steinberg\fP selects Floyd-Steinberg error
diffusion as the method for rendering intensities\&.
Use this in particular for printing photographs and other documents with
a large number of colours or small irregular shapes\&.
Regrettably, \fBpcl3\fP\&'s speed is much slower with this
method than in the other cases,
hence this value should only be used when it is really needed
(e\&.g\&., when you run into one of ghostscript\&'s halftoning problems)
or when the delay is acceptable\&.
.IP "" 10
If you are using ghostscript\ 5\&.50 and
the page to be rendered needs a lot of memory
(this applies in particular to \fBFloyd-Steinberg\fP in colour)
a core dump may result under certain circumstances\&.
You can get around this by increasing the \fBMaxBitmap\fP parameter
or by switching to a newer ghostscript version\&.
.IP "\fB-dLeadingEdge=\fIedge\fP\fP" 10
This option can be used to specify which edge of the sheet will enter the
printer first\&.
The permitted values identify this edge by reference to
the orientation of default user space on the sheet
when printing with default settings (except for \fBLeadingEdge\fP)
and a page size having width \(<= height
("canonical page in portrait orientation"):

.TS
tab();
r l.
\fBnull\fPNo request for media orientation
\fB0\fPShort edge; top of canonical page
\fB1\fPT{
Long edge; right side of canonical page
T}
\fB2\fPT{
Short edge; bottom of canonical page
T}
\fB3\fPT{
Long edge; left side of canonical page
T}
.TE
.IP "" 10
As far as I know,
given a particular PCL-3+ printer and a particular media size,
you cannot choose between short edge first (0 or 2) and
long edge first (1 or 3):
this orientation is prescribed by the manufacturer and should be documented
in your printer\&'s manual\&.
If in doubt, use short edge first when inserting the medium\&.
.IP "" 10
The default value for \fIedge\fP is
\fBnull\fP\&.
This leads either to 0 or to 3,
depending on whether the subdevice normally expects media of this size
to be fed short edge first or long edge first\&.
See the subsection
\fI\fIMedia Sizes and
Orientations\fP\fR
in the \fIDESCRIPTION\fP section above for details\&.
.IP "" 10
If you find that you can\&'t set this parameter from PostScript but you can set
it from the command line,
ghostscript\&'s \fBsetpagedevice\fP definition probably does not
pass the parameter to drivers\&.
Read the \fBgs-mods\&.txt\fP file in the \fBpcl3\fP
distribution on how to fix this\&.
.IP "\fB-dManualFeed[=\fIboolean\fP]\fP" 10
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 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 \fBfalse\fP\&.
.IP "" 10
In PCL, manual feed is established by requesting a particular media source (2),
hence you should expect that setting this parameter will interfere with the
input tray selection via \fBInput\%At\%trib\%utes\fP
(see the
\fI\fIMedia Sources and Destinations\fP\fR
subsection in the \fICONFIGURATION\fP section below)\&.
.IP "\fB-sMediaConfigurationFile=\fIpathname\fP\fP" 10
This option must specify an existing file containing a list of
supported media sizes, sheet orientations
and corresponding margin descriptions for the printer\&.
This will take precedence over the builtin subdevice-specific lists\&.
The format of the file is described in the
\fI\fICONFIGURATION\fP\fR
section below\&.
This option is primarily intended to be used with the subdevices
\fBunspecold\fP and \fBunspec\fP\&.
.IP "" 10
The default is not to use a media configuration file but the builtin lists\&.
However,
a media file path can also be specified at compile time overriding the default
behaviour for \fBunspec\fP only\&.
Using the
\fBMediaConfigurationFile\fP
option in addition will take precedence over the compiled-in media file path\&.
.IP "\fB-dMediaPosition=\fIposition\fP\fP" 10
This option sets the standard PostScript page device parameter
\fBMediaPosition\fP to the specified value\&.
The integer \fIposition\fP identifies an input tray for
feeding media from and
must refer to an existing entry in the \fBInputAttributes\fP
dictionary (see the
\fI\fIMedia Sources and Destinations\fP\fR
subsection in the \fICONFIGURATION\fP section below)
in order to take effect\&.
The media selection process will use this entry in preference to others
provided it matches the media request\&.
The default is not to request a particular tray by position but to look for
a best match based on other properties\&.
As ghostscript\&'s default configuration defines only one entry in
\fBInputAttributes\fP
this option is ineffective unless you modify \fBInputAttributes\fP\&.
.IP "" 10
With current ghostscript versions	
you can\&'t use this parameter to select a
negative \fIposition\fP\&.
The driver will issue a warning if you attempt it\&.
If the entry is actually selected,
a \fBrangecheck\fP error from ghostscript will follow\&.
This restriction applies only to this device parameter,
not to permissible values for position numbers in
\fBInputAttributes\fP:
if you want to use a negative \fIposition\fP,
you can do so by making sure that it is the only matching entry
or by selecting it via \fBPriority\fP\&.
.IP "\fB-sMedium=\fImedium\fP\fP" 10
This option selects the type of medium you wish to print on
as far as the printer needs to know about it\&.
The possible choices are:

.TS
tab();
l l.
\fB0\fP\fBplain paper\fP
\fB1\fP\fBbond paper\fP
\fB2\fP\fBHP Premium paper\fP
\fB3\fP\fBglossy paper\fP
\fB4\fP\fBtransparency film\fP
\fB5\fP\fBquick dry glossy\fP
\fB6\fP\fBquick dry transparency\fP
.TE

The default is \fBplain paper\fP\&.
For \fImedium\fP,
you can specify the full strings (these are the standard values),
the (in some cases) 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 you are using a group-3 subdevice\&.
If you don\&'t,
the effect is the same as specifying \fBplain paper\fP\&.
The values 5 and 6 are unknown to most DeskJets;
the only official exception I know of is the HP 2000C printer\&.
Your printer\&'s manual should tell you which kinds of medium are supported\&.
.IP "\fB-dOnlyCRD[=\fIboolean\fP]\fP" 10
This parameter influences the PCL code generated
and should only be specified for group-3 DeskJets\&.
The default value is \fBfalse\fP and leads to the new
PCL command Configure Raster Data being used only when it is necessary\&.
Specifying \fBtrue\fP leads to Configure Raster Data
being used even in those cases where older commands would be sufficient\&.
.IP "" 10
There are indications that printers with a PCL dialect of
"PCL Level 3 enhanced" need a value of \fBtrue\fP for this
option to enable some of their functionality\&.
.IP "\fB-sPageCountFile=\fIpathname\fP\fP" 10
The \fIpathname\fP
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,
\fBpcl3\fP
will create the file and insert the number of pages printed,
in the second case the number will be incremented by that amount\&.
Parallel invocations of
\fBgs\fP
are permitted to use the same file\&.
\fBpcl3\fP
will also make the initial page count available in its page device dictionary\&.
.IP "" 10
This option is mainly intended for spooler backends calling
\fBpcl3\fP\&.
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 hence why it is a good idea to use \fBdraft\fP quality
whenever possible
and why you should have bought a laser printer\&.
.IP "" 10
The driver can be compiled without this option present
but on a UNIX system I would not expect this to be done unless
\fBgs\fP
offers the same functionality in a driver-independent manner
which it currently does not\&.
.IP "" 10
\fBpcl3\fP
is distributed with example files \fBif-pcl3\fP and
\fBcups-pcl3\fP
of Berkeley and CUPS spooler backends using this option\&.
.IP "\fB-sPCLInit1=\fIstring\fP\fP and \fB-sPCLInit2=\fIstring\fP\fP" 10
These options can be used to insert additional PCL commands into
\fBpcl3\fP\&'s output\&.
Strings given to \fBPCLInit1\fP will be sent immediately after the
initial Printer Reset command,
the value of \fBPCLInit2\fP will be emitted shortly before the
raster data of the first page\&.
The default is not to send any additional commands\&.
.IP "" 10
Don\&'t use any of these options unless you understand PCL or someone who does
tells you which value to choose under which circumstances\&.
.IP "" 10
Because not every possible \fIstring\fP value can be
passed from the command line,
these parameters are best set from a PostScript file\&.
.IP "\fB-sPJLJob=[\fIjobname\fP]\fP" 10
This option can be used to surround the generated file with
Printer Job Language (PJL) commands declaring it to be a single print job
called \fIjobname\fP\&.
If you omit \fIjobname\fP, you create an unnamed job\&.
The string \fIjobname\fP may not contain double quotes
or control characters except HT
(the forbidden byte codes are 0 to\ 8, 10 to\ 31, and\ 34)\&.
.IP "" 10
Use this option if your printer understands PJL and
you discover either that settings for one job influence the following job
or that the printer does not recognize the end of the job (lights remain
flashing or a control panel still displays a processing message)\&.
If you send the generated PCL file through a PJL filter,
in particular one querying the printer\&'s state,
omit this option and use the filter for this purpose instead\&.
.IP "\fB-sPJLLanguage=\fIlanguage\fP\fP" 10
If a printer supports several command languages and PCL\ 3+ is not the
default,
the printer must be told to switch to PCL\ 3+ at the beginning of the
print job\&.
Hewlett-Packard\&'s printers use a Printer Job Language (PJL) command
for this purpose\&.
Specifying this option will switch the printer to
\fIlanguage\fP for the duration of the job and back to the
default at the end\&.
.IP "" 10
This option is not usually necessary except that there are indications that
printers with a PCL dialect of "PCL Level 3 enhanced" need
\fB-sPJLLanguage=PCL3GUI\fP
to enable some of their functionality\&.
.IP "" 10
You should never use the option unless you have a reliable source for the values
of \fIlanguage\fP accepted by your printer,
for example the output from \fBpcl3opts\fP for a file generated
by an official driver for the printer in question\&.
Values I have seen so far are \f(CWPCLSLEEK\fR and
\f(CWPCL3GUI\fR\&.
.IP "" 10
If you send the generated PCL file through a PJL filter,
omit this option and use the filter for this purpose instead\&.
.IP "\fB-sPrintQuality=\fIquality\fP\fP" 10
There are three print quality settings:

.TS
tab();
r l.
\fB-1\fP\fBdraft\fP or \fBecono\fP
\fB0\fP\fBnormal\fP
\fB1\fP\fBpresentation\fP or \fBbest\fP
.TE

The default is \fBnormal\fP\&.
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 you have selected a group-3 subdevice\&.
If you haven\&'t,
the effect is the same as specifying \fBnormal\fP\&.
.IP "\fB-dRasterGraphicsQuality=\fIquality\fP\fP" 10
This option is only available for old DeskJets
(including \fBunspecold\fP)
and controls a trade-off between quality and print speed\&.
The possible values for \fIquality\fP are:

.TS
tab();
r l.
\fB0\fPUse current control panel setting
\fB1\fPDraft
\fB2\fPHigh
.TE

Specifying this option overrides the default value derived from
\fBMedium\fP and \fBPrintQuality\fP\&.
.IP "\fB-dSendBlackLast[=\fIboolean\fP]\fP" 10
When printing with four inks,
a PCL-3+ printer expects the colour information for a row of pixels
in the order black, cyan, magenta, and finally yellow (KCMY)\&.
.IP "" 10
There exists at least one printer (Olivetti JP792) which claims to accept
PCL\ 3+ 
but expects the colour planes to arrive in the order CMYK\&.
If you have a printer with this property, use this option\&.
The default value is \fBfalse\fP\&.
.IP "\fB-dSendNULs=\fInumber\fP\fP" 10
Most HP drivers for newer DeskJet printers generate PCL files starting with a
sequence of 600 NUL characters, at least one uses even 9600 NULs\&.
I have seen no documentation of this feature
but I assume that in PCL the NUL character demands a null operation, i\&.e\&.,
does nothing\&.
Just in case such a NUL sequence is useful under certain circumstances,
this option can be used to request it\&.
(It has been suggested that this is needed to get the printer to accept
new PCL commands if the previous print job was aborted in the middle of a
command\&.)
The value \fInumber\fP specifies the number of
NUL characters to send and must not be negative\&.
The default is zero\&.
Note that initial NULs might confuse spooler backends which
try to determine the file type from the first few bytes of the file contents\&.
.IP "" 10
There is no point in using this option if some other command
in your print pipeline will add Printer Job Language (PJL) commands
to the \fBpcl3\fP-generated file\&.
.IP "\fB-dShingling=\fIshingling\fP\fP" 10
This option is only available for group-2 DeskJets
(including \fBunspecold\fP)
and controls the number of passes the print head makes over the medium\&.
A higher number permits more neighbouring pixels
to be printed in separate passes,
thereby reducing the likelihood of the ink spreading into the next pixel\&.
The possible values for \fIshingling\fP are:

.TS
tab();
r l.
\fB0\fPNo shingling
\fB1\fP2 passes (50% each pass)
\fB2\fP4 passes (25% each pass)
.TE

Specifying this option overrides the default value derived from
\fBMedium\fP and \fBPrintQuality\fP\&.
.IP "\fB-sSubdevice=\fIsubdevice\fP\fP" 10
This option identifies the printer model for which the generated file is
intended\&.
The following names (mostly of Hewlett-Packard DeskJet printers)
are accepted for \fIsubdevice\fP:
.PP
.RS
.IP "" 10
\fBhpdj\fP,
\fBhpdjplus\fP,
\fBhpdjportable\fP,
\fBhpdj310\fP,
\fBhpdj320\fP,
\fBhpdj340\fP,
\fBhpdj400\fP,
\fBhpdj500\fP,
\fBhpdj500c\fP,
\fBhpdj510\fP,
\fBhpdj520\fP,
\fBhpdj540\fP,
\fBhpdj550c\fP,
\fBhpdj560c\fP,
\fBunspecold\fP,
\fBhpdj600\fP,
\fBhpdj660c\fP,
\fBhpdj670c\fP,
\fBhpdj680c\fP,
\fBhpdj690c\fP,
\fBhpdj850c\fP,
\fBhpdj855c\fP,
\fBhpdj870c\fP,
\fBhpdj890c\fP,
\fBhpdj1120c\fP,
\fBunspec\fP\&.
.RE
.IP "" 10
The correspondence with the real printer name is, I hope, obvious\&.
Note that \fBhpdj\fP does not select the
\fBhpdj\fP driver (this driver\&'s predecessor)
but configures the \fBpcl3\fP driver
for the "classical" HP DeskJet\&.
.IP "" 10
With the exception of \fBhpdj\fP,
\fBunspec\fP and \fBunspecold\fP,
your \fBgs\fP binary might support the subdevice names also
as device names,
i\&.e\&., instead of specifying
\fB-sDEVICE=pcl3
-sSubdevice=\fIsubdevice\fP\fR
you might be able to write
\fB-sDEVICE=\fIsubdevice\fP\fR\&.
Check ghostscript\&'s list of available devices to find out whether this is the
case (\fBgs -h\fP)\&.
.IP "" 10
The choice of subdevice primarily determines which resolutions, colour models,
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\&.
Several of the subdevices are treated identically\&.
.IP "" 10
The default subdevice is \fBunspec\fP\&.
It is intended for new PCL-3+ printers not explicitly supported by this driver\&.
For \fBunspec\fP,
all subdevice-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 and should use the \fBMediaConfigurationFile\fP
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 of 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 colorant and pixel,
the printer must in addition understand the Configure Raster Data command\&.
.IP "" 10
The subdevice \fBunspecold\fP is similar but behaves like
a DeskJet 560C\&.
It supports all colour models and all uniform resolutions
(the horizontal resolution is equal to the vertical resolution)\&.
.IP "" 10
If you choose to use \fBunspec\fP or
\fBunspecold\fP
it is your responsibility to ensure that \fBpcl3\fP
is only called with parameter values the printer can handle\&.
This applies in particular to the resolution and the intensity levels\&.
.IP "" 10
If you set this parameter from a PostScript document you must know that
doing this re-initializes most of the \fBpcl3\fP parameters
to their default values\&.
If you set several page device parameters in a single
\fBsetpagedevice\fP call
the \fBSubdevice\fP option will be treated first\&.
.IP "\fB-dTumble[=\fIboolean\fP]\fP" 10
When duplex printing is requested (\fB-dDuplex\fP),
this parameter specifies whether the y axes of PostScript\&'s default user space
on the two sides of the sheet (assumed to use the same page size) point to the
same edge or to opposite edges\&.
The default value \fBfalse\fP indicates the same edge and
is usually suitable for binding on the left while
\fBtrue\fP indicates opposite edges and should be used for
binding at the top\&.
.IP "" 10
You should note that the interpretation of \fBTumble\fP refers to
default user space:
if a PostScript program has rotated the user space coordinate system
the association between the page\&'s apparent "up" direction and the binding edge
will usually not be the one desired\&.
You should watch for this in particular when creating output
in landscape orientation from an application still generating
PostScript Level 1 code\&.
If a ghostscript screen driver like \fBx11\fP displays the pages
with the right side up you should have nothing to worry about,
even in the case of landscape orientation\&.
(You must call \fBgs\fP directly for this test,
not via \fBghostview\fP\&.)
If the orientation between the two sides turns out to be wrong,
you will have to print again with the opposite value for
\fBTumble\fP\&.
If that does not help and you have a printer supporting only one of the two
possible duplex orientations,
check the relative order of \fBrestore\fP and
\fBshowpage\fP in the document you printed
(see the \fBDuplexCapability\fP option above)\&.
.IP "\fB-dUseCard[=\fIvalue\fP]\fP" 10
This option should only be given when printing on A6 and with a printer like the
HP DeskJet 1120C which distinguishes between A6 sheets and A6 postcards\&.
The option can be used to specifically request one of the alternatives\&.
The default \fIvalue\fP is \fBnull\fP
and means that sheets are preferred to postcards,
but either is acceptable if supported\&.
The other permitted values are
\fBtrue\fP and \fBfalse\fP\&.
.IP "" 10
This option applies to all page sizes set while ghostscript
executes and this includes the default size set at startup\&.
If you wish to use \fB-dUseCard=true\fP you will
therefore usually have to specify the \fBPAPERSIZE\fP option in the
call,
otherwise an error will occur because there is no postcard variant for the
usual default sizes (ISO A4 and US Letter)\&.
.SS "Option Combinations for Hardware Parameters"
.PP
Not all combinations of colour model, resolution, number of intensity levels,
print quality and media type are accepted or make sense\&.
Unfortunately, Hewlett-Packard does not publicly release sufficient information
to find the best possible combinations\&.
A good way to find reasonable settings is to use \fBpcl3opts\fP
on files generated by an official driver for the printer\&.
You should also check the file \fBreports\&.txt\fP in the
\fBpcl3\fP distribution\&.
In addition, I\&'ll provide some remarks here\&.
.PP
As a general rule,
it is unprofitable to use a finer resolution than 300 ppi or more than
2 intensity levels for draft quality\&.
A coarser resolution in particular can reduce the time needed to generate
and transmit the file to the printer\&.
Combined with draft quality this leads to what HP calls an "EconoFast" mode\&.
.PP
As an exception, here are recommendations based on official HP documentation
for the DeskJet 1120C\&.
The table lists the resolution and the number of black or black and CMY levels
if not 2\&.
.PP
.RS
.TS
tab();
l l l.
QualityGrayCMYK
_
draft300 ppi300 ppi
normal300 ppi, 4 levels300 ppi, (4,3) levels
presentation600 ppi300 ppi, (4,4) levels
.TE
.RE

These seem reasonable values for the supported series-800 DeskJets as well\&.
.SS "Checking Page Device Parameters"
.PP
As for all ghostscript drivers,
\fBpcl3\fP\&'s command line options correspond to identically-named
PostScript page device parameters
and are accessible in the usual way\&.
In particular,
it is possible to read the value of a parameter
by letting \fBgs\fP execute a command like
.PP
.RS
.PP
.nf
\f(CWcurrentpagedevice /\fIparameter\fP get ==\fR
.fi
.PP
.RE
where \fIparameter\fP is the name of the parameter one
would like to inspect,
for example \fBBlackLevels\fP\&.
This is useful if you are in doubt whether the driver has accepted your options\&.
Of course, for printer-visible parameters you can also use
\fBpcl3opts\fP on the output file\&.
.PP
The ghostscript distribution contains a program \fBuninfo\&.ps\fP
which displays the page device dictionary on standard output
but does not resolve nested dictionaries\&.
The \fBpcl3\fP distribution contains a similar program
\fBdumppdd\&.ps\fP which does not have this limitation\&.
.SH "CONFIGURATION"
.SS "Media Configuration File"
.PP
A \fImedia configuration file\fR
(\fImedia file\fR for short) can be used to override the
builtin subdevice-specific lists of supported media sizes
and, for each size, the sheet orientation in the input tray
and the margins enforced by the printer\&.
This feature is mainly intended to be used in conjunction with
\fBunspec\fP and \fBunspecold\fP:
if you have a model not directly supported by this driver, look up the
supported media sizes,
the rules for inserting media
and the corresponding printable regions in your printer\&'s
manual and enter them in a media file\&.
.PP
.ne 3
.RS
\fBCaution:  
.PP
Entering a media size in the file which is not really supported by your
printer is not useful:
the PCL interpreter will simply ignore the request to set this 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
\fBFIXEDMEDIA\fP,
shift the image if necessary,
establish properly-positioned clipping regions within the real size, and print\&.
Or you could use a suitable page size recovery policy for PostScript\&'s
media selection process\&.
However, if you have a newer DeskJet supporting custom page sizes,
all this is not necessary\&.
.RE
.PP
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 usually 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\&.
.PP
A line in the media file can be blank, a comment line (first non-blank
character is \&'\fB#\fP\&'), or one of the following:
.PP
.RS
.TS
tab();
l l.
\fBunit\fP\fIunit\fP
\fIsize\fP\fIleft\fP \fIbottom\fP  \fIright\fP \fItop\fP
.TE
.RE
.PP
A \fBunit\fP line specifies in which units
margin specifications in the following lines should be interpreted\&.
\fIunit\fP
can either be \fBin\fP (inch) or
\fBmm\fP (millimetre)
with \fBin\fP being the default\&.
A unit specification remains in force until overridden by a following
\fBunit\fP line\&.
.PP
The second kind of line states that the model supports a particular
media configuration and specifies the hardware margins in force for that case\&.
The \fIsize\fP word consists of two parts:
a keyword denoting the extension and an optional suffix\&.
The following keywords are accepted
(entries marked with an asterisk (*) are those used by the subdevice
\fBunspec\fP
if no media file is employed;
entries with a section/paragraph sign (§) similarly identify the sizes
used by \fBunspecold\fP):

.TS
tab();
r l.
\fBIndex3x5in\fPUS index card 3 × 5 in
\fBEnvChou4\fPT{
Japanese long envelope #4 (90 × 205 mm)
T}
\fBEnvMonarch\fPT{
US Monarch envelope (3\&.875 × 7\&.5 in)
T}
*\fBPostcard\fPJapanese Hagaki card (100 × 148 mm)
*\fBIndex4x6in\fPUS index card 4 × 6 in
§*\fBEnv10\fPUS no\&. 10 envelope (4\&.125 × 9\&.5 in)
\fBA6\fPISO/JIS A6 (105 × 148 mm)
*\fBA6Card\fPISO/JIS A6 postcard (105 × 148 mm)
§*\fBEnvDL\fPISO DL envelope (110 × 220 mm)
\fBEnvUS_A2\fPUS A2 envelope (4\&.375 × 5\&.75 in)
*\fBEnvC6\fPISO C6 envelope (114 × 162 mm)
\fBEnvChou3\fPT{
Japanese long envelope #3 (120 × 235 mm)
T}
*\fBIndex5x8in\fPUS index card 5 × 8 in
\fBStatement\fPUS Statement (5\&.5 × 8\&.5 in)
\fBDoublePostcard\fPdouble Postcard (148 × 200 mm)
*\fBA5\fPISO/JIS A5 (148 × 210 mm)
\fBEnvC5\fPISO C5 envelope (162 × 229 mm)
\fBISOB5\fPISO B5 (176 × 250 mm)
*\fBJISB5\fPJIS B5 (182 × 257 mm)
§*\fBExecutive\fPUS Executive (7\&.25 × 10\&.5 in)
§*\fBA4\fPISO/JIS A4 (210 × 297 mm)
§*\fBLetter\fPUS Letter (8\&.5 × 11 in)
§*\fBLegal\fPUS Legal (8\&.5 × 14 in)
\fBEnvKaku2\fPT{
Japanese Kaku envelope (240 × 332 mm)
T}
\fBJISB4\fPT{
JIS B4 (257 × 364 mm)\&.
This is distinct from ISO B4 (250 × 353 mm)\&.
T}
\fBTabloid\fPT{
US Tabloid (11 × 17 in; in landscape orientation also called "Ledger")
T}
\fBA3\fPISO/JIS A3 (297 × 420 mm)
\fBHPSuperB\fPwhat HP calls Super B (13 × 19 in)
*\fBCustomPageSize\fPcustom page size
.TE

Note the difference between \fBA6\fP (sheet) and
\fBA6Card\fP (postcard)\&.
I do not know why Hewlett-Packard associates this distinction with media size
instead of media type\&.
However, with the exception of the 1120C all DeskJet printers I know of
use only \fBA6Card\fP anyway\&.
.PP
In looking at your printer\&'s documentation, bear in mind that a driver might
support more sizes than the printer accepts;
\fBpcl3\fP needs to be given the latter values\&.
If you are in doubt what your printer understands,
\fBpcl3opts\fP can tell you which media size another driver
requests\&.
.PP
Custom page sizes are not understood by older printers
and may be used in a media file only for the subdevices
\fBhpdj540\fP,
\fBhpdj6\fInn\fP[c]\fR,
\fBhpdj8\fInn\fPc\fR,
\fBhpdj1120c\fP,
and \fBunspec\fP (group\ 3)\&.
In these cases you can print, within certain limits, on arbitrarily-sized media\&.
The driver knows these limits and refuses to generate a file if you exceed them\&.
For \fBunspec\fP, there are no limits\&.
\fBpcl3\fP
will tell the printer to expect a custom page size
only if there is no fitting discrete entry\&.
.PP
Although it is possible, on those printers which support it,
to use a media configuration file containing only a custom page size entry,
I advise against it
because this size specification is only intended as a last resort\&.
If you have a custom page size entry in the media file,
you should therefore list \fIall\fP discrete sizes supported by
your printer or at least those which you expect to use\&.
.PP
The size keyword in the \fIsize\fP field can be extended
by the following strings:
.IP "\fBBig\fP" 10
For \fBpcl3\fP, this suffix means banner printing\&.
In these cases the top and bottom margins are usually zero\&.
HP DeskJets supporting banner printing do so only for ISO A4 and US Letter\&.
Your media file should then contain entries for the
\fIsizes\fP
\fBA4\fP,
\fBA4Big\fP,
\fBLetter\fP, and
\fBLetterBig\fP\&.
.IP "\fB\&.Transverse\fP" 10
By default,
\fBpcl3\fP assumes that the media listed are fed short edge first\&.
If you specify this qualifier,
the driver will assume that you are going to feed media of this size
long edge first\&.
If, for example,
your printer\&'s manual states that envelopes of size ISO DL should be fed
long edge first,
the corresponding \fIsize\fP field in your media file
should contain the string \fBEnvDL\&.Transverse\fP,
not \fBEnvDL\fP\&.
.IP "" 10
This specification (or its absence) can be overridden with the option
\fBLeadingEdge\fP in the call\&.
.PP
The builtin lists for the \fBunspec\fP and
\fBunspecold\fP devices do not contain size entries with any
of these suffixes\&.
.PP
Every media file must contain at least an entry which fits ghostscript\&'s
default page size,
usually ISO A4 or US Letter\&.
Only those sizes which are listed will be accepted by \fBpcl3\fP\&.
This is independent of a \fB\&.Transverse\fP suffix\&.
If there are several entries in the media file with the same
\fIsize\fP value,
only the first is used\&.
.PP
The margins in a size entry should be valid for monochrome printing in
raster graphics mode\&.
If a non-monochrome colour model is selected and unless the bottom margin is
exactly zero,
it will be increased by a subdevice-specific amount\&.
This increment is zero for \fBunspecold\fP and
\fBunspec\fP\&.
.PP
The orientation of the margins refers to the feeding direction:
you should imagine holding the sheet such that the leading edge is at the top
and the side to be printed on is towards you\&.
Be careful with envelopes:
older (pre-1997) HP documentation usually gives the margins in landscape
orientation
even for those printers where the envelope has to be fed short edge first\&.
You can check this by looking for the largest margin value:
if it is on the left instead of at the bottom you almost certainly have such a
landscape-based specification;
rotate the values by +90 degrees (quarter-circle counterclockwise) in these
cases\&.
The margins have to be specified as non-negative floating point numbers
in inches or millimetres
as announced by the last preceding \fBunit\fP line\&.
The floating point format is that of the "C" locale\&.
.PP
\fBpcl3\fP
is distributed with an example of a media configuration file,
\fBexample\&.mcf\fP\&.
.SS "PostScript Configuration Files"
.PP
Sometimes it is desirable to execute additional PostScript commands for a
particular file or possibly all files sent to a particular printer or print
queue\&.
With ghostscript this is easily possible because \fBgs\fP
accepts several file names in the invocation and processes them sequentially\&.
This is particularly appropriate for those PostScript operators which affect
device-specific features and should therefore not appear in a portable page
description
and for settings which would be part
of the interpreter\&'s persistent state when using a real PostScript printer\&.
.PP
The \fBpcl3\fP distribution contains examples of filters
\fBif-pcl3\fP for the Berkeley spooler
\fBlpr\fP\fB(1)\fP
and \fBcups-pcl3\fP for the Common UNIX Printing System
\fBcupsd\fP\fB(8)\fP\&.
These filters permit the use of a print-queue-specific configuration file\&.
.SS "Media Sources and Destinations"
.PP
PostScript has a builtin mechanism for selecting media sources and destinations
based on certain properties of the document\&.
This usually requires a system administrator to set the
\fBInputAttributes\fP and \fBOutputAttributes\fP 
dictionaries in the device\&'s page device dictionary according to the current
state of the printer and its intended use\&.
For example, if there are two input trays,
one currently holding paper and the other transparencies,
the administrator could configure the \fBInputAttributes\fP
dictionary such that print jobs requesting transparencies in a certain manner
automatically fetch media from the second tray
and every job needing a size not currently available will terminate with
an error message\&.
Unfortunately, in order to work as expected this process usually also requires
some additional action on the part of the entity generating the PostScript code
to be printed\&.
.PP
If your printer is capable of sensing certain properties of media in the
input tray (e\&.g\&., media size)
or assumes a fixed association between media properties and input trays
you must expect this functionality to interfere with the process referenced
here\&.
.PP
In the attributes dictionaries,
each tray is identified by an integer,
its \fIposition number\fR\&.
When ghostscript successfully matches the document\&'s requirements with trays
the resulting position numbers are accessible to the driver\&.
The \fBpcl3\fP driver uses these numbers (except 0)
directly as arguments
for the PCL commands "Media Source" and "Media Destination", respectively\&.
For the Media Source values (input trays), I know of the following meanings:

.PP
.RS
.TS
tab();
r l.
-1banner printing
1T{
default tray; portable CSF (DJ 340); tray 2 (HP 2500C)
T}
2manual feed
3envelope feed
4T{
desktop CSF (DJ 340); tray 3 (HP 2500C)
T}
5tray 1 (HP 2500C)
7auto select (HP 2500C)
.TE
.RE

You\&'ll have to experiment with your printer to find out which values are
accepted and what their interpretation is\&.
In general,
you can only expect 1 and 2 to work\&.
Unrecognized values should be simply ignored by the printer
leading to the medium being fetched from the default tray\&.
To shorten the search, use \fBpcl3opts\fP
if you can in order to find out which values other drivers generate\&.
Don\&'t bother testing the value\ 0:
in PCL its effect is to eject a page and, as this is not needed,
\fBpcl3\fP uses it to mean that no particular tray should be
selected\&.
.PP
I do not know of any PCL-3+ printer supporting more than one output tray,
hence the corresponding implementation is based on the speculation that such
a feature, if made available,
would use the same command as in PCL\ 5\&.
Again, a value of zero is used by \fBpcl3\fP to mean
"don\&'t select a particular tray"\&.
.PP
Ghostscript\&'s default configuration defines
\fBInputAttributes\fP and
\fBOutputAttributes\fP dictionaries with one entry each,
having position number 0 in both cases,
and maps all requests to these positions\&.
As explained above, this configuration will lead to \fBpcl3\fP
not requesting any particular input or output tray\&.
If you wish to modify this you should consult a PostScript manual,
for example the sections 6\&.2\&.1 and 6\&.2\&.4 in the
\fIPostScript Language Reference\fP\&. 
However, I\&'ll present here three examples without explanation\&.
In all cases, the PostScript code shown should be executed before the
document to be printed\&.
.PP
The first example is intended for situations where you always wish to select
a specific input tray:
.PP
.RS
.PP
.nf
\f(CW<<
  /InputAttributes <<
    0 null	
    \&\fIinput\fP << /PageSize [6 6 524287 524287] >>
  >>
>> setpagedevice\fR
.fi
.PP
.RE
Replace \fIinput\fP with the number of the tray
you wish to use\&.
The second example does the same for the output tray:
.PP
.RS
.PP
.nf
\f(CW<<
  /OutputAttributes <<
    0 null
    \&\fIoutput\fP << >>
  >>
>> setpagedevice\fR
.fi
.PP
.RE
Replace \fIoutput\fP with the number of the tray
you wish to use\&.
.PP
For the final example assume that you have one input tray,
filled with media of a certain default size,
and you wish all print jobs requesting another size to automatically switch
to manual feed so you can insert these special sheets at leisure\&.
In that case,
let \fBgs\fP execute the following PostScript code:
.PP
.RS
.PP
.nf
\f(CW<<
  /InputAttributes <<
    0 << /PageSize [\fIwidth\fP \fIheight\fP] >>
    2 << /PageSize [6 6 524287 524287] >> 
    /Priority [0 2]
  >>
>> setpagedevice\fR
.fi
.PP
.RE
.PP
For \fIwidth\fP and \fIheight\fP you
must insert the actual dimensions of your default size
in units of 1 bp ("big point", 1/72 inch, roughly 0\&.35 mm);
the tolerance is 5 bp\&.
In contrast to a document\&'s page size,
the orientation is irrelevant here\&.
.PP
If you drop the second entry and the \fBPriority\fP line
in the last example
you obtain a configuration where ghostscript will refuse to print any document
not requesting the specified media size\&.
If you retain the two lines and you are using the
\fBunspecold\fP or \fBunspec\fP devices
it is advisable to insert your printer\&'s actual size bounds instead of those
given above\&.
This will protect you against printing on some sizes
not supported by your printer\&.
.SS "Banner Printing"
.PP
Some printers support printing on continuous forms,
also called banners or z-fold media\&.
Your printer\&'s manual should tell you whether this is supported and in
particular how to load these media\&.
.PP
In order to print on continuous media with \fBpcl3\fP,
configure it as follows:
.IP "   \(bu" 6
Make sure that input position number -1 will be selected
(see the subsection
\fI\fIMedia Sources And Destinations\fP\fR
above)\&.
.IP "   \(bu" 6
In the call to \fBgs\fP,
select a subdevice supporting the intended "\fBBig\fP" size\&.
By default,
only the subdevices \fBhpdj680c\fP,
\fBhpdj690c\fP and \fBhpdj1120c\fP
support banner printing
(\fBA4Big\fP and \fBLetterBig\fP)\&.
.PP
Don\&'t forget to prepare the printer as well\&.
.SS "Correcting Offsets"
.PP
A media configuration file is intended to adapt
\fBpcl3\fP
to the difference in margin settings between printer models and should usually
contain "official" information,
preferably taken from the model\&'s manual\&.
.PP
A different situation arises if a particular printer\&'s output is not properly
positioned on the page even if the margin information is correct for this
model\&.
PostScript defines two arrays in the page device dictionary for correcting such
misadjustments,
both containing two numbers describing a desired shift of the page image with
respect to device space coordinate axes but in different units\&.
The values in the `\fBMargins\fP\&' array are interpreted with
respect to a canonical default resolution,
the newer `\fBPageOffset\fP\&' array
is taken to be in units of 1/72 inch ("big points", bp)\&.
For \fBpcl3\fP the device coordinate system has an
x axis pointing to the right and a y axis pointing downwards
when looking at the sheet with the leading edge at the top and the side to be
printed on towards you\&.
The canonical default resolution is 300 ppi\&.
.PP
As an example, assume your printer shifts its output 1 mm to the right
and 0\&.5 mm upwards\&.
Now create a file containing either the PostScript code
.PP
.RS
.PP
.nf
\f(CW<< /Margins [-11\&.8 5\&.9] >> setpagedevice\fR
.fi
.PP
.RE
("shift 11\&.8 pixels to the left and 5\&.9 pixels down") or
.PP
.RS
.PP
.nf
\f(CW<< /PageOffset [-2\&.8 1\&.4] >> setpagedevice\fR
.fi
.PP
.RE
("shift 2\&.8 bp to the left and 1\&.4 bp down")
and have it executed by ghostscript before the file to be printed\&.
.PP
The margin test files distributed with \fBpcl3\fP
can be used to determine the necessary correction\&.
You should be aware that you have to expect fluctuations between individual
print jobs,
in particular in the horizontal direction\&.
.SS "Transfer Functions"
.PP
DeskJets usually produce prints which are too dark (too much ink on the page),
most noticeably when using more than 2 intensity levels per colorant\&.
In this case you should perform
\fIgamma correction\fR
by modifying what PostScript calls \fItransfer functions\fR\&.
In the simplest case,
create a file containing the PostScript command
.PP
.RS
.PP
.nf
\f(CW{\fInumber\fP exp} settransfer\fR
.fi
.PP
.RE
.PP
where a good value for \fInumber\fP
is usually in the range 0\&.3-0\&.5,
and specify this file in ghostscript\&'s command line before the file you wish to
print\&.
Now the intensities of all colorants will be rescaled by exponentiation
with \fInumber\fP\&.
Because PostScript intensity values are in the range zero to one
with zero meaning dark and one meaning light (additive interpretation),
a value of \fInumber\fP <\ 1
will lead to lighter colours and
\fInumber\fP >\ 1 results in darker colours\&.
.PP
The best value for \fInumber\fP depends on the
print quality,
the number of intensity levels,
the method chosen for intensity rendering,
the kind of medium you print on,
and the properties of the document to be printed\&.
.PP
Note that there is no common convention for the interpretation of
stand-alone gamma values\&.
When dealing with other software you might for example find that the boundary
between light and dark is at a value of\ 1000 and
that lighter colours are obtained with larger values\&.
In order to understand what a "gamma value" means
you therefore need the complete specification of the transfer function and,
if the value does not refer to PostScript,
also information on the interpretation of intensity values\&.
.PP
You can also set independent transfer functions for the four colorants
by using the operator \fBsetcolortransfer\fP
which expects four routines as arguments\&.
Consult a PostScript manual if you want to learn more about transfer functions\&.
.PP
If you are using \fB-sIntensityRendering=halftones\fP,
less than 32 intensity levels per colorant,
a resolution below 800 ppi,
and unless you explicitly set transfer functions,
\fBgs\fP applies a default gamma correction roughly corresponding
to a value of 0\&.8 for \fInumber\fP\&.
.SH "LIMITATIONS"
.SS "Ghostscript Version"
.PP
This manual page contains statements relying on undocumented properties of
ghostscript\&.
These statements are to my best knowledge and belief correct for current
ghostscript versions
but I do not check all these statements for every new version\&.
.PP
If you are in doubt about a particular point, please check it yourself\&.
.SS "Reliability"
.PP
Hewlett-Packard does not publicly provide sufficiently detailed or accurate
technical information to write a reliable driver for all of its PCL-3+ printers\&.
The amount and quality of available information differs between printer models\&.
As a consequence,
\fBpcl3\fP cannot provide the same level of reliability for all
of its devices\&.
.PP
In my opinion the best-documented printers are those of the DeskJet-500 series\&.
In addition, I have currently access to a DeskJet 850C which I have used for a
number of experiments\&.
Support for these printers should be considered to be the most reliable\&.
.PP
The next level of reliability belongs to the remaining printers for which
subdevices exist\&.
In these cases I had at least access to official HP documentation on supported
media sizes and associated hardware margins
and in addition for almost all cases some information on the supported PCL
commands,
sometimes complemented by PCL files generated by HP\&'s official drivers and sent
me by users\&.
.PP
The third level of reliability is associated with those printers for which
people have sent success reports
but for which I have no official information from HP\&.
.PP
With decreasing reliability it becomes increasingly probable
that there is printer functionality which is not accessible through
\fBpcl3\fP or
even that this driver generates PCL code not accepted by the printer\&.
.SS "Mixed Resolutions"
.PP
Some printers are able to print with different resolutions for black and
CMY on the same region of a page\&.
For example, the best quality on a DeskJet 850C is achieved with 600 ppi for
black and 300 ppi for CMY\&.
This is not supported by \fBpcl3\fP\&.
.SS "Photo Cartridges"
.PP
From what I\&'ve heard, DeskJet printers with photo cartridges installed do not
use a CMYK palette but instead one with 6 components\&.
I have no official information on this interface
and even if I had it wouldn\&'t help because
ghostscript does not currently support \fBDeviceN\fP as a
native colour space\&.
.SS "Cartridge Alignment"
.PP
DeskJet printers with more than one ink cartridge present should usually be
configured for the proper relative alignment of these cartridges\&.
Apparently, this information is stored in not-immediately-volatile memory
in the printer together with some settings (like the default media size)
which are not relevant for printing with \fBpcl3\fP\&.
As I do not have information on how this is done,
you will need to use one of HP\&'s programs for this purpose\&.
.PP
On a Linux system, try installing and running HP\&'s DOS DeskJet control panel
\fBDJCP\fP in the DOS emulator\&.
\fBDJCP\fP should be present on one of the installation media
you received with your printer\&.
One user managed to get this to work
for a DJ 670C with DOSEMU 0\&.98 under RedHat 5\&.2 by setting
.PP
.RS
.PP
.nf
\f(CW$_ports = "0x378 0x379"\fR
.fi
.PP
.RE
in \fBdosemu\&.conf\fP\&.
I was not successful on my Debian system\&.
.PP
The \fBpcl3\fP distribution contains a file
\fBcalign\&.ps\fP which you can print if you wish to check
to which extent the cartridges are aligned\&.
.SH "KNOWN BUGS"
.PP
There are no known bugs in \fBpcl3\fP proper,
but there do exist restrictions or bugs in \fBgs\fP
which can lead to faulty behaviour when printing with \fBpcl3\fP\&.
As far as I noticed them
they are mentioned in the body of this manual page at the relevant points\&.
.PP
You can find an up-to-date bug list for this driver via
\fBpcl3\fP\&'s home page on the Web\&.
.SH "SEE ALSO"
.PP
\fBgs\fP\fB(1)\fP,
\fBpcl3opts\fP\fB(1)\fP
.PP
\fI\fIA First Guide to PostScript\fP (link to URL http://www.cs.indiana.edu/docproject/programming/postscript/postscript.html) \fR
.PP
Adobe Systems,
\fI\fIPostScript Language Reference\fP (link to URL http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf) \fR\&.
Third edition, 1999\&.
.SH "AUTHOR"
.PP
Copyright \(co 2000, 2001 by Martin Lottermoser,
Greifswaldstraße 28, 38124 Braunschweig, Germany\&.
E-mail:
Martin\&.Lottermoser@t-online\&.de\&.
.PP
\fBpcl3\fP has a
\fIhome page (link to URL http://home.t-online.de/home/Martin.Lottermoser/pcl3.html) \fR on the Web\&.
.PP
This is free software,
released under the terms of the
\fIGNU Lesser General Public License (LGPL) (link to URL http://www.gnu.org/copyleft/lesser.html) \fR,
Version 2\&.1\&.
\fIUSE IT AT YOUR OWN RISK\&.\fP
.PP
Version of this reference page: $Revision: 1.1 $
($Date: 2002/07/12 16:11:41 $)\&.
...\" created by instant / docbook-to-man, Sun 19 Aug 2001, 12:15
