<!doctype linuxdoc system>
<article>

<!-- Title information -->

<title>PPA Printer-Support RPM Packages for Red Hat Linux and Compatible Distributions
<author>The pnm2ppa project team 
<htmlurl url="mailto:ppa-rpms@sourceforge.net"
name="ppa-rpms@users.sourceforge.net">
<date>v0.27, Nov 11,  2000
<abstract>
Information and installation instructions
to accompany pnm2ppa packages 
for Red Hat Linux available at 
<htmlurl 
url="http://sourceforge.net/projects/pnm2ppa"
name="http://sourceforge.net/projects/pnm2ppa">
(Updated for pnm2ppa-1.04 and later.)
See the &quot;Troubleshooting&quot; section at the end of
this document for
fixes to  some reported problems
</abstract>

<!-- Begin the document -->


<p>
<bf> Overview of HP's PPA DeskJet Printers.</bf>

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 
<itemize>
<item> <em>DeskJet 710C Series</em>: HP DeskJet 710C, 712C
<item> <em>DeskJet 720C Series</em>: HP DeskJet 720C, 722C
<item> <em>DeskJet 820C Series</em>: HP DeskJet 820Cxi, 820Cse
<em>(discontinued)</em>
<item> <em>DeskJet 1000C Series</em>: HP DeskJet 1000Cxi, 1000Cse
<em>(discontinued)</em>
</itemize>

feature &quot;Host-based&quot; printing, 
and use HP's proprietary
PPA (<em>Printer Performance Architecture</em>) 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 &quot;Winmodems&quot; 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 &quot;color science&quot; 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.   <bf> All other currently-offered
DeskJet models appear to be standard PCL3 
printers.</bf>


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, 
<htmlurl 
url="http://www.normsoft.com/ppa"
name="http://www.normsoft.com/ppa">
and
<htmlurl 
url="http://pnm2ppa.sourceforge.net"
name="http://pnm2ppa.sourceforge.net">,
and continued by the <em>pnm2ppa</em> project at
<htmlurl 
url="http://sourceforge.net/projects/pnm2ppa"
name="http://sourceforge.net/projects/pnm2ppa">
has managed to produce drivers that provide basic printing
functionality for these PPA printers under Linux and other
Unices.



<p>
<bf> The pnm2ppa driver for color printing with  PPA printers.</bf>

Color printing with PPA printers is supported by the 
<em><tt>pnm2ppa</tt></em> driver which is the successor to the  older
black-and-white-only driver 
<htmlurl url="http://pnm2ppa.sourceforge.net/files/pbm2ppa-0.8.6.tar.gz"
name="pbm2ppa-0.8.6"> developed by Tim Norman.   


<tt>pnm2ppa</tt> 
can translate <em>portable anymap</em> (<em>pnm</em>)
format images into a stream of PPA instructions which can be sent to the
printer.   In the driver name, 
&quot;<em>pnm</em>&quot; stands for the superset 
of <em>three</em> image formats:
<em>ppm</em> (portable &quot;pixmap&quot; format for color images),
<em>pgm</em> (portable &quot;greymap&quot; format for greyscale images),
and <em>pbm</em> (portable &quot;bitmap&quot; format for black and white  images).

Ghostscript has a number of &quot;output devices&quot; that
produce pnm format output from postscript or pdf input.
These come in <em>plain</em> (text) and <em>raw</em> 
(binary) variants.  While <tt>pnm2ppa</tt> can now interpret
both plain and raw pnm formats, there is no point in using the
inefficient plain formats: <em>always</em> use the &quot;raw&quot;
output devices, which are:
<itemize>
<item><em>ppmraw</em> - raw pixmap format (color images);
<item><em>pgmraw</em> - raw greymap format (greyscale images);
<item><em> pbmraw</em> - raw bitmap format (black and white images);
<item><em>pnmraw</em> - selects between ppm, pgm, and pbm raw formats;
<item><em>pgnmraw</em> - selects between pgm and pbm raw formats.
</itemize>
The last two output devices are switches that try to analyze the
image, and  select an appropriate format; however, they are not
recommended for routine use, as they may inconsistently choose the format.
The <tt>ghostscript-5.10</tt>
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
<tscreen><verb>
gs --help
</verb></tscreen>
if the required <tt>ppmraw</tt> or
<tt>pbmraw</tt> devices are not shown, you will have to upgrade your
version of ghostscript.

The data must be streamed directly from ghostscript to
<tt>pnm2ppa</tt> 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 <tt>file.ps</tt> using <tt>gs</tt> (ghostscript) and <tt>pnm2ppa</tt> is
<tscreen><verb>
cat file.ps | gs -q -sDEVICE=ppmraw -r600 -sPAPERSIZE=letter -dNOPAUSE \
 -sOutputFile=- - | pnm2ppa --eco -v 720  -i - -o - | lpr -l  
</verb></tscreen>
(all on a single line).   In this example the paper size is explicitly
given to  <tt>gs</tt> as <em>US Letter</em>
(8.5&quot;x11&quot;) size
(<tt>letter</tt>); <tt>pnm2ppa</tt> no longer needs to be told what
the paper size is,  and will read it from the  <tt>gs</tt> output (and check
that it is a permitted size for the printer type).   
The  <tt>pnm2ppa</tt> option <tt>--eco</tt> specifies &quot;EconoFast&quot;
mode, for a lower quality output which uses less ink, and prints faster,
and <tt>-v 720</tt> 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 <tt>pnm2ppa</tt>
driver itself, an enhanced version of Red Hat's <tt>rhs-printfilters</tt>
RPM package is provided; after this is installed, the PPA printer
can be managed like other standard printers with the Red Hat
<tt>printtool</tt> utility.  The postscript file can then be printed with
the simple command
<tscreen><verb>
lpr file.ps
</verb></tscreen>

<itemize>
<item>
<em>
However, if you wish to print to paper sizes supported by ghostscript,
but not supported by the Red Hat <tt>printtool</tt>  utility, you can
use  scripts like the one above.
The HP 710C, 720C, and 820C series support paper sizes  from
3&quot;x3&quot; to 8.5&quot;x14&quot;, while the 1000C
supports 4&quot;x6&quot; to 13&quot;x19&quot;.
</em>
</itemize>

<p>
<bf> Available RPM packages.</bf>

A RPM package for <tt>pnm2ppa</tt> 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 
<tt>pnm2ppa</tt> 
at
<htmlurl 
url="http://sourceforge.net/projects/pnm2ppa"
name="http://sourceforge.net/projects/pnm2ppa">.   

The latest version at the time
of writing is 
<tt>pnm2ppa-1.04-1.i386.rpm</tt>, 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
<tt>pnm2ppa-1.04-1.src.rpm</tt> instead:
<tscreen><verb>
rpm --rebuild pnm2ppa-1.04-1.src.rpm
</verb></tscreen>
(You must be <tt>root</tt> to do this, and have the necessary
compilers installed; on Red Hat, the rebuilt binary RPM will be created in
the directory  <tt>/usr/src/redhat/RPMS/i386/</tt>.)

Red Hat 6.2 and later also includes support for configuring your
printer to use <tt>pnm2ppa</tt> using  <tt>printtool</tt>
and <tt>rhs-printfilters</tt>.
If you are using  Red Hat 6.1 and earlier,you will need to
update the <tt>rhs-printfilters</tt> that came with the distribution
to the
<tt>rhs-printfilters-1.57-4ppa4.i386.rpm</tt>  also available at
<htmlurl 
url="http://sourceforge.net/projects/pnm2ppa"
name="http://sourceforge.net/projects/pnm2ppa">.   
(This is designed to work only with <tt>printtool-3.43</tt> 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 <tt>pnm2ppa-1.04-1</tt>
RPM package supplies the necessary files that you can use.
After installing this RPM, see
<tt>/usr/lib/rhs/rhs-printfilters/README.ppa</tt> for details.

<p>
<bf> Installing the <tt>pnm2ppa</tt> RPM package and setting up the PPA printer.</bf>

To install the RPM package, you must log in as the system administrator,
<tt>root</tt>.   

Now begin the installation. First install the <tt>pnm2ppa</tt> RPM:
<tscreen><verb>
rpm -Uvh pnm2ppa-1.04-1.i386.rpm
</verb></tscreen>
The <tt>pnm2ppa</tt> executable gets installed in <tt>/usr/bin/</tt>.

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 <tt>detect_ppa</tt> is provided by the <tt>pnm2ppa</tt>
RPM:  just type
<tscreen><verb>
detect_ppa
</verb></tscreen> 
to confirm that your Printer is found.

It is possible (especially on Red Hat 6.1) that you will have to add
a line 
<tscreen><verb>
alias parport_lowlevel parport_pc
</verb></tscreen>
to the file <tt>/etc/conf.modules</tt> for the printer to be found (this is
a parallel port recognition issue, not specific to PPA printers.
and a known &quot;gotcha&quot; on Red Hat 6.1).
A typical message from the printer, which will
be displayed if autodetection is successful, is:
<tscreen><verb>
CLASS:PRINTER;
MODEL:DESKJET 820C;
MANUFACTURER:HEWLETT-PACKARD;
DESCRIPTION:Hewlett-Packard DeskJet 820C;
COMMAND SET:SCP,VLINK;
</verb></tscreen>
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 <tt>test_ppa</tt>
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 
<em><tt>/dev/lp1</tt></em> under  older 2.0.x kernels, and (usually)
<em><tt>/dev/lp0</tt></em> under newer 2.2.x kernels, as in Red Hat 6.x.
Type
<tscreen><verb>
test_ppa
</verb></tscreen>
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.
<itemize>
<item> <em><em>Tip:</em>
The </em><tt>test_ppa</tt><em> script 
does not use the print filters that
will be installed by the </em><tt>rhs-printfilters</tt><em> 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.</em>
</itemize>

<p>
<bf> Installing the PPA-enhanced <tt>rhs-printfilters</tt> RPM package (if needed).</bf>

<itemize>
<em>
This step is NOT needed on  Red Hat 6.2 or later.</em>
</itemize>

The <tt>rhs-printfilters</tt> rpm distributed with
Red Hat 6.1 does not support <tt>pnm2ppa</tt>,
If you use an older distribution, you will first have to replace their
<tt>rhs-printfilters</tt> RPM with the PPA-enhanced version from the
pnm2ppa project.

Once you have confirmed you have a working printer, install the
RPM <tt>rhs-printfilters-1.57-4ppa4.i386.rpm</tt> 
<tscreen><verb>
rpm -Uvh rhs-printfilters-1.57-4ppa4.i386.rpm     
</verb></tscreen>

<bf> Configuring the print filters with <tt>printtool</tt>.</bf>

Now start the &quot;<em>Red Hat Linux Print System Manager</em>&quot; 
(as root) to 
configure the printer, either
by clicking on the printer icon in Red Hat's &quot;control-panel&quot;, or just 
typing 
<tscreen><verb>
printtool
</verb></tscreen>
In the Print System Manager window, click on <em>Add</em>, then
in the &quot;Add a Printer Entry&quot;, select <em>Local Printer</em>, and
click <em>Ok</em>. Hopefully, the port on which the printer is attached
will be listed as &quot;Detected&quot; (<em>if not, 
fix the problem before continuing</em>, perhaps by
adding the line &quot;<tt>alias parport_lowlevel parport_pc</tt>&quot;
to <tt>/etc/conf.modules</tt>), as mentioned above.
You will now have to &quot;<em>edit
the local printer entry</em>&quot; for the PPA printer.    Click on
<em>Select</em> to chose the &quot;Input filter&quot;.  
The <em>Configure Filter</em> screen will open.
Among the many printer entries in the list
&quot;<em>Printer Type</em>&quot;, you should find three entries
<itemize>
<item><bf>HP DeskJet 1000 series (PPA)</bf> (for 1000Cse, 1000Cxi models)
<item><bf>HP DeskJet 710/720 series (PPA)</bf> (for 710C, 712C, 720C, 722C models)
<item><bf>HP DeskJet 820 series (PPA)</bf> (for 820Cse, 820Cxi models)
<itemize>
<item> If these entries do not show up, it may be because the older
<tt>rhs-printfilters</tt> package that you updated did not allow
the printer database <tt>/usr/lib/rhs/rhs-printfilters/printerdb</tt>
to be replaced.  Try deleting  or renaming the <tt>printerdb</tt>
file, and then reinstall
the PPA-enhanced <tt>rhs-printfilters</tt> RPM using
&quot;<tt>rpm --force  -Uvh rhs-printfilters*</tt>&quot; 
</itemize>
</itemize>


Select the appropriate
entry for your printer model. You will then be presented with
various options:
<itemize>
<item>
The <em>Driver Description</em> box contains information about the
driver (you may have to use the scrollbar at the right of the box
to read it all).   
<item>The <em>resolution</em> box shows a single
resolution (600x600).  There are no other choices.
<item>
The <em>Paper Size</em> box allows 
various choices (only <em>letter</em>, <em>legal</em>, and <em>a4</em>
seem correspond to native paper sizes printed by the Red Hat print filters;
the other choices, (a3, ledger, ...) appear to get resized by
the print filters to print on US Letter size paper (?) ).
(Other paper sizes cannot be selected this way, but you <em>can</em>
print to any papersize, <em>if it supported by both ghostscript 
and the printer</em>, using a script, as described above, that bypasses
the  RedHat printfilters.)
<item>
The <em>Color Depth/ Uniprint Mode</em> box allows various selections
of color and print quality (These are achieved by
using  various combinations
of the <tt>pnm2ppa</tt> options
<em>--eco</em> (EconoFast mode), <em>-p</em> (disable black
ink cartridge) and <em>--bw</em> (black and white printing only),
without direct intervention by the user.)  The choices (in the
most recent <tt>printerdb</tt> database) are:
<itemize>
<item> Black and White, econofast mode (<tt>--bw --eco</tt>)
<item> Black and White, normal quality (<tt>--bw</tt>)
<item> Color, econofast  mode (<tt>--eco --fd</tt>)
<item> Color, normal quality (<tt>--eco</tt>)
<item> Color, high quality 
<item> Color, normal quality, black ink disabled (<tt>-p --eco</tt>)
<item> Color, high quality, black ink disabled (<tt>-p --uni</tt>)
</itemize>
(These are the choices that will be  presented by &quot;official&quot;
<tt>rhs-printfilters-1.72</tt>; if you installed a <tt>pnm2ppa</tt>
RPM package from
<htmlurl 
url="http://sourceforge.net/projects/pnm2ppa"
name="the SourceForge pnm2ppa site">, you may have a file
<tt>/usr/lib/rhs/rhs-printfilters/README.ppa</tt> explaining how to modify
earlier versions of <tt>rhs-printfilters</tt> to show these updated
choices.)  

You may also see a choice to use the older &quot;Legacy&quot;
driver <tt>pbm2ppa</tt> (black and white only); this is 
is stable but unmaintained; it may still be a useful
alternative to  <tt>pnm2ppa</tt> on older, slower systems with
less available memory. 

<item>
The three <em>Printing options</em> are not relevant here, and
should <em>not</em> be selected. They are for direct printing
of text (ascii) to non-postscript printers, but since the only way of printing
text files with <tt>pnm2ppa</tt> is
by first converting them to postscript(tm), this is <em>not</em> 
possible on the PPA printer.
<itemize>
<item>
<em>It is important that the choice </em>
&quot;Fast text printing (non-PS printers only)&quot;<em> is NOT selected, 
so that the print filters will
convert text files to postscript before printing.</em>  
</itemize>
<item>The <em>Margins</em>
entries control the margins used when printing text files
(these are instructions to the text-to-postscript
conversion process).
<item>
The <em>Extra GS options</em> box is not only a place for adding
options for ghostscript, but also for the PPA drivers.  
<em>Leave this box empty unless you know what you are doing</em>.
As explained in the text in the Driver Description box
(you did read it, didn't you ?),  the entry should be  in the format:
<tscreen><verb> 
gs_options PPA ppa_options 
</verb></tscreen>
Anything before the 
&quot;<tt>PPA</tt>&quot; is interpreted as a <tt>gs</tt> option, anything after it
is interpreted as a <tt>ppa</tt> option.  You can learn about 
<tt>pnm2ppa</tt> options by typing either &quot;<tt>man pnm2ppa</tt>&quot;
or &quot;<tt>pnm2ppa --help</tt>&quot; at a command line (hopefully, these
two sources of information will be consistent with each other!);
</itemize>
When you have made your choices, click on <em>Ok</em> to 
save your selections and close the &quot;Configure Filter&quot; screen,
and then click  on <em>OK</em> to close the &quot;Edit Local Printer Entry&quot;
screen.

You are now back in the &quot;Red Hat Print System Manager&quot; screen;
highlight the printer you just configured, and, in the <em>Tests</em>
menu, choose <em>Print Postscript test page</em> 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.



<p>
<bf> Configuring pnm2ppa.conf and calibrating the printer. </bf>

A number of printer parameters are set to reasonable  default values
for each  of the printer models, but you may wish to &quot;fine tune&quot;
or calibrate your printer.   The  default values can be overridden
by entries in the configuration files, which by default are
<tt>/etc/pnm2ppa.conf</tt> and <tt>/etc/pbm2ppa.conf</tt>.
At  600dpi, one pixel is 1/600 inch. 

The user-adjustable parameters are:
<itemize>
<item> <bf>verbose 1</bf> and <bf>silent 1</bf>.   These control
messages about progress and errors from  <tt>pnm2ppa</tt>.  By default,
messages are sent to the system log <tt>/var/log/messages</tt>.
The <tt>verbose 1</tt> keyword send copies to  <tt>stderr</tt>, the
standard error stream to the terminal.   The <tt>silent 1</tt>
keyword silences the stream of messages to the system log.
<itemize>
<item>
<bf> The system log messages  may be  silenced in the default
configuration file; switch off &quot;silent&quot;
mode  with &quot;silent 0&quot; for debugging printer
problems (or use verbose mode).</bf>
</itemize>
<item> The <bf>version</bf> keyword can be used to specify
the printer model as  710, 712, 720, 722, 820, or 1000.
It is not needed if you use the RedHat printool to
configure the printer.

<item> <bf>xoffset</bf> and <bf>yoffset</bf>: the x-offset and y-offset
(in pixels) of the
printed image on the page, which should be chosen so the image
is correctly centered on the paper.  (These can also be set with
the <tt> -x  &lt;xoff&gt; </tt> and <tt> -y &lt;yoff&gt; </tt> options.)
See <htmlurl 
url="./CALIBRATION.html"
name="CALIBRATION.html"> (or CALIBRATION.txt) for more information.


<item> <bf>topmargin</bf>, <bf>bottommargin</bf>, <bf>leftmargin</bf>, 
<bf>rightmargin</bf>: the four
margins, which define the distances (in pixels)
from the edges of the paper to the
printed region; parts of the image that are outside these margins
will not be printed.
(These can also be set with the
<tt> -t &lt;top margin&gt; </tt>,
<tt> -b &lt;bottom margin&gt; </tt>,
<tt> -l &lt;left margin&gt; </tt>, and
<tt> -r &lt;right margin&gt; </tt>
options.) 

<item> <bf>ColOffsX</bf> and <bf>ColOffsY</bf>: the  x-offset and y-offset
(in pixels)
between  the color image produced by the color ink printer head, and that
produced by the black ink printer head.
These should be recalibrated 
<bf> each time an ink cartridge is replaced</bf>.  
See <htmlurl 
url="./CALIBRATION.html"
name="CALIBRATION.html"> (or CALIBRATION.txt) for more information.

<item> <bf>blackshear</bf> and <bf>colorshear</bf>: these are x offsets
between right-to-left and left-to-right sweeps of the print head, one for 
the black printing and one for the color printing.  These provide sideways
offsets  (in pixels)  of the right-to-left sweeps, 
that can be used to correct &quot;shearing&quot; when printing
in modes that use bidirectional print head sweeps.

<item><bf>unimode 1</bf>  will make unidirectional
print sweeps (left-to-right) the default, instead
of bidirectional sweeps. The <tt>--uni</tt>
and <tt>--bi</tt> options can control how a particular print
run is printed.    Unidirectional printing is only useful
(it is slower) if there are issues  of &quot;shearing&quot;
in high quality image printing.

<item> <bf>blackness</bf> : this takes values 0,1,2,3 or 4 drops of
black ink per pixel, and controls black ink density in black-and-white
and &quot;text-like&quot;  black regions  in color printing.   At present,
this has no effect on printing  with the black ink cartridge  disabled,
or on black regions identified as &quot;image-like&quot;.   (This can
also be set with the <tt> -B &lt;n&gt;</tt> option,
where <tt>n</tt> is the number of drops.)


<item><bf>GammaR</bf>, <bf>GammaG</bf>, and <bf>GammaB</bf>:
the are the three &quot;gamma&quot; parameters that define the 
standard  color correction
curves for red, green, and blue.   Changing these will affect how
colors appear (decreasing any Gamma enhaces the corresponding color).   
The Gamma values are specified as decimal numbers,
with Gamma = 1.0 corresponding to no color correction.
<item>
Gamma values can also be specified using integer numbers
<bf>RedGammaIdx</bf>, <bf>GreenGammaIdx</bf>, <bf>BlueGammaIdx</bf>;
These are determined by a procedure  discussed in 
<htmlurl 
url="./COLOR.html"
name="COLOR.html"> or COLOR.txt,
which involves printing a test page.  The <bf>papersize</bf>
keyword specifies the paper size used  for this testpage,
because it is produced by <tt>pnm2ppa</tt> without the input that
usually specifies the page size.
<item>
The keywords 
<bf>black_ink 0</bf>, 
<bf>color_ink 0</bf>, 
<bf>cyan_ink 0</bf>, 
<bf>magenta_ink 0</bf>, 
and <bf>yellow_ink 0</bf>
can be used to switch of the various inks; this can be useful
in troubleshooting and debugging  <tt>pnm2ppa</tt>.
</itemize>

Use <tt>test_ppa</tt> 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 &quot;extra GS options&quot; box using the Print System Manager
(<tt>printtool</tt>), as described above. 


<p>
<bf> Utility programs for the printer.</bf>

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
<htmlurl 
url="http://www.sourceforge.net/project/?group_id=1118"
name="http://www.sourceforge.net">.   
However, as of the time of writing, no PUP support
for PPA printers is available  (volunteers, anyone?).

<p>
<bf>Troubleshooting</bf>

The first thing to do is to look at the messages from <tt>pnm2ppa</tt>
in the system log to see what is happening, whether <tt>pnm2ppa</tt>
<bf>actually received any input</bf>, and if it was valid.
<bf> (You may  need to enable system log messages in 
<tt>/etc/pnm2ppa.conf</tt>, see above.)</bf>
Maybe  ghostscript failed to convert your postscript file into
PNM format: this is <bf>not</bf> a <tt>pnm2ppa</tt> problem!
Here are suggestions for dealing with problems that you may encounter.
<itemize>
<item><bf> Printing fails in the middle of a print run</bf>, perhaps
when a figure embedded in the document is printing (in the latest
<tt>pnm2ppa</tt> versions, printing finishes normally, but an incomplete
document is printed).   The system  log
reports that <tt>read_line</tt> could not read the image, and found EOF
(end-of-file).    This probably
means that <tt>ghostscript</tt>'s &quot;ppmraw&quot; or 
&quot;pgmraw&quot; 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 &quot;pbmraw&quot; output device.
<item>
<bf>The <tt>test_ppa</tt> script works,
but you can't get  <tt>printtool</tt> to make the printfilters work.</bf>

You installed  <tt>pnm2ppa-1.0</tt> and the  PPA-enhanced
<tt>rhs-printfilters</tt> (earlier than v. 1.61) from  the pnm2ppa 
SourceForge page.   You are using <tt> printtool</tt> v. 3.43 or earlier
and are probably a Mandrake user.    
Solution: (a)  use  <tt>printtool </tt> to uninstall the PPA printer;
(b) delete (or rename) the printer database 
<tt>/usr/lib/rhs/rhs-printfilters/printerdb</tt>, and reinstall
the <tt>rhs-printfilters</tt> RPM using the 
&quot;<tt>rpm --force ... </tt>&quot;
option; (c) use <tt>printtool</tt> to add the
PPA printer again. 
(Your previously-installed <tt>rhs-printfilters</tt> may have
resisted replacement of its <tt>printerdb</tt>).
<item>
<bf>You upgraded your RedHat (or compatible) Linux distribution
and your printfilters no longer work</bf>.
You used to use a PPA-enhanced <tt>rhs-printfilters</tt> from the
pnm2ppa SourceForge site.   You 
upgraded your distribution to one using <tt>printtool</tt> v 3.44 or later
(e.g. RedHat 6.2).    
Solution: Make sure that 
<tt>rhs-printfilters</tt> has been updated to a version
1.61 or greater that came with your
upgraded distribution.
Use <tt>printtool</tt> to  delete, and then add the
PPA printer 
This will create a new printer configuration compatible
with your upgraded distribution.
<item>
<bf>You printed  an image file using a  &quot;high quality&quot; 
printer setting, but it has  visible horizontal  lines 
on it </bf>and printing under Windows(tm) 9x doesn't
show  this effect (except in &quot;economode&quot;).
These are probably &quot;swath boundaries&quot;,
showing the junction between different sweeps of the print head.
Solution: using unidirectional printing (PPA option <tt>--uni</tt>,
or <tt>unimode 1</tt> in <tt>/etc/pnm2ppa.conf</tt>) helps a little, but
this problem requires an extensive  
rewrite of part of pnm2ppa (<tt>cutswath.c</tt>)
for a satisfactory solution.  (Volunteers welcome -  see the TODO file in the
pnm2ppa docs (<tt>/usr/doc/pnm2ppa*/TODO</tt>)!) 
<item>
&quot;<bf>Flashing light syndrome</bf> &quot;.
Your printer usually works, but you have found that some particular
documents cause the printer to fail, and the lights on its panel
start flashing rapidly in sequence.   Solution, turn the printer off and back
on again.   This is not supposed to happen any more; if it happens 
reproducibly, contact the pnm2ppa developers, and offer to 
make the offending
file available for testing and diagnosis of this problem.
(Don't sent it to the Mailing List unless requested).
Bug reports can be filed at
<htmlurl 
url="http://sourceforge.net/projects/pnm2ppa"
name="the SourceForge pnm2ppa site">.
<item>
<bf>You wish to  print on envelopes or other non-standard media
not supported by the  print filters</bf>?
Solution:  if you can get  Ghostscript (<tt>gs</tt>) 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.
<item>
<bf>Colors look wrong, or do not match what the Windows(tm) 9x driver
produces</bf>.  Solution:  check that
your color ink cartridge is
not running out of some ink color; if not,
(a) adjust the &quot;gamma&quot;
entries in <tt>/etc/pnm2ppa,conf</tt>, or (b)
install a customized color calibration file
<tt>/etc/pnm2ppa.gamma</tt>.  See the file
<htmlurl 
url="./COLOR.html"
name="COLOR.html"> (or COLOR.txt) for more information.
</itemize> 

<p>
<bf>Contacting the pnm2ppa project.</bf>

Send comments or corrections (about this document or the RPMS) to:
<htmlurl url="mailto:ppa-rpms@sourceforge.net"
name="ppa-rpms@users.sourceforge.net">

There are three mailing lists, 
<em>ppa.announce</em> (announcements), 
<em>ppa.users</em> (users helping users)
and <em>ppa.devel</em> (developers).
You can subscribe to them, or browse their
archives, at
<htmlurl 
url="http://pnm2ppa.sourceforge.net"
name="http://pnm2ppa.sourceforge.net/maillist.htm">.

To contact the developers, subscribe to <em>ppa.devel</em> and post a message.

There are Public Forums for posting questions
and comments
at <htmlurl 
url="http://sourceforge.net/projects/pnm2ppa"
name="http://sourceforge.net/projects/pnm2ppa">
(but whether you get any help from these, depends on
whether anyone is reading them).

</article>











