Overview of HP's PPA DeskJet Printers.
Most of Hewlett-Packard's DeskJet(tm) printers use the PCL3 command language, and are currently supported by Ghostscript drivers. However, a few models, namely
feature "Host-based" printing, and use HP's proprietary PPA (Printer Performance Architecture) protocol, instead of PCL. The two models in each series are physically identical; they just come with different bundled Windows software. The 820C and 1000C series are discontinued at this time (January 2000).
PPA printers rely on software running on the host CPU to carry out the low-level processing of printer output that would be done by hardware in a standard PCL printer. The relation of PPA printers to PCL printers is analogous to the relation between "Winmodems" and true modems.
Unfortunately, HP only supplies Windows software drivers for PPA printers, and have indicated that it is unlikely that they will ever make the proprietary PPA specs public. This is apparently because of concerns that publication of the specs might reveal crucial details of HP's trade secrets about "color science" to competitors. (A secondary issue is that it is apparently possible to physically damage the printer by sending it bad sequences of PPA commands, which is not the case for PCL commands, and it seems that HP do not wish to take any responsibility for such damage by encouraging unofficial PPA programming.)
In fact, the decline in hardware component prices has meant that the anticipated cost-savings through using host-based PPA instead of printer-based PCL are less than expected, and two of the PPA printer series (820C, 1000C) have been phased out, and replaced by similar PCL printers in HP's product line. The 710C and 720C series are still being sold at this time of writing. All other currently-offered DeskJet models appear to be standard PCL3 printers.
Many Linux users may have inadvertently purchased PPA DeskJet models, mistaking them for PCL3 DeskJets, for which independently-produced Linux drivers have long been available. Fortunately, a reverse engineering effort, started in 1998 by Tim Norman, http://www.normsoft.com/ppa and http://pnm2ppa.sourceforge.net, and continued by the pnm2ppa project at http://sourceforge.net/projects/pnm2ppa has managed to produce drivers that provide basic printing functionality for these PPA printers under Linux and other Unices.
The pnm2ppa driver for color printing with PPA printers.
Color printing with PPA printers is supported by the
pnm2ppa
driver which is the successor to the older
black-and-white-only driver
pbm2ppa-0.8.6 developed by Tim Norman.
pnm2ppa
can translate portable anymap (pnm)
format images into a stream of PPA instructions which can be sent to the
printer. In the driver name,
"pnm" stands for the superset
of three image formats:
ppm (portable "pixmap" format for color images),
pgm (portable "greymap" format for greyscale images),
and pbm (portable "bitmap" format for black and white images).
Ghostscript has a number of "output devices" that
produce pnm format output from postscript or pdf input.
These come in plain (text) and raw
(binary) variants. While pnm2ppa
can now interpret
both plain and raw pnm formats, there is no point in using the
inefficient plain formats: always use the "raw"
output devices, which are:
ghostscript-5.10
package supplied with Red Hat 6.x distributions provides all these
devices; older versions may not. To see the list of available
ghostscript output devices, type the command line
gs --help
if the required ppmraw
or
pbmraw
devices are not shown, you will have to upgrade your
version of ghostscript.
The data must be streamed directly from ghostscript to
pnm2ppa
to the (local) printer without being
stored in any intermediate
file: one ppm-format (color) US Letter size page is represented
by 3x5100x6600 Bytes (100MB) in binary format and four times this amount in
text format.
An example of
a command line for printing a postscript
file file.ps
using gs
(ghostscript) and pnm2ppa
is
cat file.ps | gs -q -sDEVICE=ppmraw -r600 -sPAPERSIZE=letter -dNOPAUSE \
-sOutputFile=- - | pnm2ppa --eco -v 720 -i - -o - | lpr -l
(all on a single line). In this example the paper size is explicitly
given to gs
as US Letter
(8.5"x11") size
(letter
); pnm2ppa
no longer needs to be told what
the paper size is, and will read it from the gs
output (and check
that it is a permitted size for the printer type).
The pnm2ppa
option --eco
specifies "EconoFast"
mode, for a lower quality output which uses less ink, and prints faster,
and -v 720
specifies the PPA printer as belonging
to the DeskJet 720C series.
Obviously, it would be impractical to type such a command each time
one wished to print something, so in addition to the pnm2ppa
driver itself, an enhanced version of Red Hat's rhs-printfilters
RPM package is provided; after this is installed, the PPA printer
can be managed like other standard printers with the Red Hat
printtool
utility. The postscript file can then be printed with
the simple command
lpr file.ps
printtool
utility, you can
use scripts like the one above.
The HP 710C, 720C, and 820C series support paper sizes from
3"x3" to 8.5"x14", while the 1000C
supports 4"x6" to 13"x19".
Available RPM packages.
A RPM package for pnm2ppa
is part of the Red Hat Linux
distribution starting with Red Hat 6.2.
You will also find a RPM package for the latest release of
pnm2ppa
at
http://sourceforge.net/projects/pnm2ppa.
The latest version at the time
of writing is
pnm2ppa-1.04-1.i386.rpm
, and is built on
Red Hat 6.2. If you are running a different release
of Red Hat (or a different Linux distribution)
you may need to download and rebuild the source RPM
pnm2ppa-1.04-1.src.rpm
instead:
rpm --rebuild pnm2ppa-1.04-1.src.rpm
(You must be root
to do this, and have the necessary
compilers installed; on Red Hat, the rebuilt binary RPM will be created in
the directory /usr/src/redhat/RPMS/i386/
.)
Red Hat 6.2 and later also includes support for configuring your
printer to use pnm2ppa
using printtool
and rhs-printfilters
.
If you are using Red Hat 6.1 and earlier,you will need to
update the rhs-printfilters
that came with the distribution
to the
rhs-printfilters-1.57-4ppa4.i386.rpm
also available at
http://sourceforge.net/projects/pnm2ppa.
(This is designed to work only with printtool-3.43
and earlier.)
Note: If you are using Red Hat 6.2, you may wish to update the
print filter support that it comes with. The pnm2ppa-1.04-1
RPM package supplies the necessary files that you can use.
After installing this RPM, see
/usr/lib/rhs/rhs-printfilters/README.ppa
for details.
Installing the pnm2ppa
RPM package and setting up the PPA printer.
To install the RPM package, you must log in as the system administrator,
root
.
Now begin the installation. First install the pnm2ppa
RPM:
rpm -Uvh pnm2ppa-1.04-1.i386.rpm
The pnm2ppa
executable gets installed in /usr/bin/
.
If you are using a 2.2.x kernel,
(e.g. Red Hat 6.x)
it will be able to autodetect
IEEE-1284 devices like PPA printers, provided they are attached
to the parallel port with a bidirectional IEEE-1284 cable. (If your
printer works under Windows, you have the correct cable.)
(Note that older (2.0.x) kernels do not have this autoprobe facility.)
A script detect_ppa
is provided by the pnm2ppa
RPM: just type
detect_ppa
to confirm that your Printer is found.
It is possible (especially on Red Hat 6.1) that you will have to add a line
alias parport_lowlevel parport_pc
to the file /etc/conf.modules
for the printer to be found (this is
a parallel port recognition issue, not specific to PPA printers.
and a known "gotcha" on Red Hat 6.1).
A typical message from the printer, which will
be displayed if autodetection is successful, is:
CLASS:PRINTER;
MODEL:DESKJET 820C;
MANUFACTURER:HEWLETT-PACKARD;
DESCRIPTION:Hewlett-Packard DeskJet 820C;
COMMAND SET:SCP,VLINK;
A list of PPA printers found, and the parallel ports to which they are
attached, will also be shown.
At this point it is useful to test that your printer is working, by
printing a test page using the supplied script test_ppa
which the RPM has installed. You will need to know your
printer model (710, 712, 720, 722, 820, 1000), your paper size
(letter, legal, a4) and the printer port the printer is attached to.
If it is attached to the primary parallel port, this is
/dev/lp1
under older 2.0.x kernels, and (usually)
/dev/lp0
under newer 2.2.x kernels, as in Red Hat 6.x.
Type
test_ppa
and give the details about printer model. papersize, and port number
when prompted.
You will then be asked
whether to print a test page, an offset calibration
page, or an alignment calibration page, etc.
test_ppa
script
does not use the print filters that
will be installed by the rhs-printfilters
RPM, so it is
useful when troubleshooting, for testing if any printing problems are
associated with the basic printer installation, or with the
configuration of the print filters.
Installing the PPA-enhanced rhs-printfilters
RPM package (if needed).
The rhs-printfilters
rpm distributed with
Red Hat 6.1 does not support pnm2ppa
,
If you use an older distribution, you will first have to replace their
rhs-printfilters
RPM with the PPA-enhanced version from the
pnm2ppa project.
Once you have confirmed you have a working printer, install the
RPM rhs-printfilters-1.57-4ppa4.i386.rpm
rpm -Uvh rhs-printfilters-1.57-4ppa4.i386.rpm
Configuring the print filters with printtool
.
Now start the "Red Hat Linux Print System Manager" (as root) to configure the printer, either by clicking on the printer icon in Red Hat's "control-panel", or just typing
printtool
In the Print System Manager window, click on Add, then
in the "Add a Printer Entry", select Local Printer, and
click Ok. Hopefully, the port on which the printer is attached
will be listed as "Detected" (if not,
fix the problem before continuing, perhaps by
adding the line "alias parport_lowlevel parport_pc
"
to /etc/conf.modules
), as mentioned above.
You will now have to "edit
the local printer entry" for the PPA printer. Click on
Select to chose the "Input filter".
The Configure Filter screen will open.
Among the many printer entries in the list
"Printer Type", you should find three entries
rhs-printfilters
package that you updated did not allow
the printer database /usr/lib/rhs/rhs-printfilters/printerdb
to be replaced. Try deleting or renaming the printerdb
file, and then reinstall
the PPA-enhanced rhs-printfilters
RPM using
"rpm --force -Uvh rhs-printfilters*
"
Select the appropriate entry for your printer model. You will then be presented with various options:
pnm2ppa
options
--eco (EconoFast mode), -p (disable black
ink cartridge) and --bw (black and white printing only),
without direct intervention by the user.) The choices (in the
most recent printerdb
database) are:
--bw --eco
)--bw
)--eco --fd
)--eco
)-p --eco
)-p --uni
)rhs-printfilters-1.72
; if you installed a pnm2ppa
RPM package from
the SourceForge pnm2ppa site, you may have a file
/usr/lib/rhs/rhs-printfilters/README.ppa
explaining how to modify
earlier versions of rhs-printfilters
to show these updated
choices.)
You may also see a choice to use the older "Legacy"
driver pbm2ppa
(black and white only); this is
is stable but unmaintained; it may still be a useful
alternative to pnm2ppa
on older, slower systems with
less available memory.
pnm2ppa
is
by first converting them to postscript(tm), this is not
possible on the PPA printer.
gs_options PPA ppa_options
Anything before the
"PPA
" is interpreted as a gs
option, anything after it
is interpreted as a ppa
option. You can learn about
pnm2ppa
options by typing either "man pnm2ppa
"
or "pnm2ppa --help
" at a command line (hopefully, these
two sources of information will be consistent with each other!);You are now back in the "Red Hat Print System Manager" screen; highlight the printer you just configured, and, in the Tests menu, choose Print Postscript test page to print a test page using the Red Hat print filters. If this printed correctly, your print system is set up to use the PPA printer, just like any of the other printers that the Red Hat print filters support.
Configuring pnm2ppa.conf and calibrating the printer.
A number of printer parameters are set to reasonable default values
for each of the printer models, but you may wish to "fine tune"
or calibrate your printer. The default values can be overridden
by entries in the configuration files, which by default are
/etc/pnm2ppa.conf
and /etc/pbm2ppa.conf
.
At 600dpi, one pixel is 1/600 inch.
The user-adjustable parameters are:
pnm2ppa
. By default,
messages are sent to the system log /var/log/messages
.
The verbose 1
keyword send copies to stderr
, the
standard error stream to the terminal. The silent 1
keyword silences the stream of messages to the system log.
-x <xoff>
and -y <yoff>
options.)
See
CALIBRATION.html (or CALIBRATION.txt) for more information.
-t <top margin>
,
-b <bottom margin>
,
-l <left margin>
, and
-r <right margin>
options.)
--uni
and --bi
options can control how a particular print
run is printed. Unidirectional printing is only useful
(it is slower) if there are issues of "shearing"
in high quality image printing.
-B <n>
option,
where n
is the number of drops.)
pnm2ppa
without the input that
usually specifies the page size.pnm2ppa
.Use test_ppa
to print various test pages
or calibration patterns to adjust the offsets.
If you wish to specify these
parameters using the command-line options
described above, some of them can be
entered in the "extra GS options" box using the Print System Manager
(printtool
), as described above.
Utility programs for the printer.
HP's Windows software provides a utility program that sends PPA commands to tell the printer to perform taks like cleaning the printheads, etc. The codes for some of these functions have already been reverse engineered. There are proposals to add support for PPA printers to the PUP (Printer Utility Program) utility, which is also a project at http://www.sourceforge.net. However, as of the time of writing, no PUP support for PPA printers is available (volunteers, anyone?).
Troubleshooting
The first thing to do is to look at the messages from pnm2ppa
in the system log to see what is happening, whether pnm2ppa
actually received any input, and if it was valid.
(You may need to enable system log messages in
/etc/pnm2ppa.conf
, see above.)
Maybe ghostscript failed to convert your postscript file into
PNM format: this is not a pnm2ppa
problem!
Here are suggestions for dealing with problems that you may encounter.
pnm2ppa
versions, printing finishes normally, but an incomplete
document is printed). The system log
reports that read_line
could not read the image, and found EOF
(end-of-file). This probably
means that ghostscript
's "ppmraw" or
"pgmraw" output device failed for some reason,
usually leaving a core dump, without completing the
translation of the postscript to a pnm format.
(This has been seen to happen in ghostscript 5.10 ;
upgrading to ghostscript 5.50 solved the problem.) If you cannot
upgrade, try printing the document
in black-and-white using the ghostscript "pbmraw" output device.test_ppa
script works,
but you can't get printtool
to make the printfilters work.
You installed pnm2ppa-1.0
and the PPA-enhanced
rhs-printfilters
(earlier than v. 1.61) from the pnm2ppa
SourceForge page. You are using printtool
v. 3.43 or earlier
and are probably a Mandrake user.
Solution: (a) use printtool
to uninstall the PPA printer;
(b) delete (or rename) the printer database
/usr/lib/rhs/rhs-printfilters/printerdb
, and reinstall
the rhs-printfilters
RPM using the
"rpm --force ...
"
option; (c) use printtool
to add the
PPA printer again.
(Your previously-installed rhs-printfilters
may have
resisted replacement of its printerdb
).rhs-printfilters
from the
pnm2ppa SourceForge site. You
upgraded your distribution to one using printtool
v 3.44 or later
(e.g. RedHat 6.2).
Solution: Make sure that
rhs-printfilters
has been updated to a version
1.61 or greater that came with your
upgraded distribution.
Use printtool
to delete, and then add the
PPA printer
This will create a new printer configuration compatible
with your upgraded distribution.--uni
,
or unimode 1
in /etc/pnm2ppa.conf
) helps a little, but
this problem requires an extensive
rewrite of part of pnm2ppa (cutswath.c
)
for a satisfactory solution. (Volunteers welcome - see the TODO file in the
pnm2ppa docs (/usr/doc/pnm2ppa*/TODO
)!) gs
) to
produce the correct image, and the paper size is in the range allowed
by your printer, you should be able to do this with a
script that bypasses the print filters, as described earlier
in this document./etc/pnm2ppa,conf
, or (b)
install a customized color calibration file
/etc/pnm2ppa.gamma
. See the file
COLOR.html (or COLOR.txt) for more information.
Contacting the pnm2ppa project.
Send comments or corrections (about this document or the RPMS) to: ppa-rpms@users.sourceforge.net
There are three mailing lists, ppa.announce (announcements), ppa.users (users helping users) and ppa.devel (developers). You can subscribe to them, or browse their archives, at http://pnm2ppa.sourceforge.net/maillist.htm.
To contact the developers, subscribe to ppa.devel and post a message.
There are Public Forums for posting questions and comments at http://sourceforge.net/projects/pnm2ppa (but whether you get any help from these, depends on whether anyone is reading them).