  PPA Printer support RPM Packages for Red Hat Linux and com-
  patible distributions
  The pnm2ppa project team ppa-rpms@users.sourceforge.net
  v0.1,  7 February 2000

  Information and installation instructions to accompany pnm2ppa pack-
  ages for Red Hat Linux available at http://www.sourceforge.net

   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

  o  DeskJet 710C Series: HP DeskJet 710C, 712C

  o  DeskJet 720C Series: HP DeskJet 720C, 722C

  o  DeskJet 820C Series: HP DeskJet 820Cxi, 820Cse (discontinued)

  o  DeskJet 1000C Series: HP DeskJet 1000Cxi, 1000Cse (discontinued)

  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
  a fear that publication of the specs would reveal crucial details of
  HP's trade secret color science research 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 HP do not wish to have any responsibility
  for such damage.)

  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 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://www.httptech.com/ppa, and
  continued by the pnm2ppa project at http://www.sourceforge.net 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 currently supported by the
  (experimental) pnm2ppa driver which is the successor to the stable
  (but black and white  only) driver pbm2ppa-0.8.6 developed by Tim
  Norman.  The pnm2ppa color printing driver is currently quite useable,
  and is approaching a stable release.

  Currently pnm2ppa can translate portable pixmap (ppm) 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).  At the present time,
  pnm2ppa can only interpret ppm images, but it is planned that it will
  eventually accept input in all three formats.

  Given a postscript file as input, the ghostscript output device ppmraw
  produces the pixmap format accepted by the new color driver pnm2ppa
  (the output device pbmraw  produces the bitmap format used by the
  older black-only driver pbm2ppa).   The ghostscript-5.10 package
  supplied with Red Hat 6.x distributions provides 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.

  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 -s letter -i - -o - | lpr -l




  (all on a single line).   In this example the paper size is explicitly
  given (to both gs and pnm2ppa) as US Letter (8.5"x11") size (letter);
  other supported paper sizes are US Legal (8,5"x14") size (legal) and
  A4 (a4).  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





   Available RPM packages.


  Two RPM packages are  supplied  by the pnm2ppa project for
  installation on Red Hat Linux systems, and on ``compatible''
  distributions like Mandrake.  They can be found at
  http://www.sourceforge.net.   (The latest versions at the time of
  writing are listed below, but later versions may be available when you
  read this.)

  o  pnm2ppa:

  o  pnm2ppa-0.8.9pre1-1.i386.rpm

  o  rhs-printfilters:

  o  rhs-printfilters-1.57-4ppa1.i386.rpm  for Red Hat 6.1

  o  rhs-printfilters-1.58-4ppa1mdk.i386.rpm for Mandrake 7.0.

  The second RPM (rhs-printfilters) integrates the PPA drivers with the
  Red Hat printfilters, used by  Red Hat and ``Red Hat-compatible''
  distributions.  Do not install the Red Hat  RPM on Mandrake systems:
  use the *mdk.i386.rpm package for Mandrake.


  o  Note for Mandrake users: Mandrake includes an older attempt at PPA
     support, which may be incompatible with this one.   Please  use
     theprinttool to delete any installed PPA printers   BEFORE
     upgrading rhs-prinfilters.  If you forget to do this, and printool
     will not start after the update, delete or move your/etc/printcap
     file.

  These packages should work on older releases of these distributions,
  but perhaps may first have to be rebuilt from their source RPMS.   For
  example, to rebuild the pnm2ppa rpm, the command is


       rpm --rebuild pnm2ppa-0.8.9pre1-1.src.rpm




  (You must be root to do this, and have the necessary compilers
  installed; the rebuilt RPM will be created in the directory
  /usr/src/redhat/RPMS/i386/.)


   Installing the RPM packages and setting up the PPA printer.

  To install these RPMS, log in as the system administrator, root.


  o  Tip: If you have previously installed (or attempted to install)
     either pbm2ppa  or pnm2ppa by compiling it yourself from a
     "tarball", you should first delete or move the old  pbm2ppa or
     pnm2ppa executable, so it will not be found in your path (typically
     it will be /usr/local/bin/pnm2ppa).  You should also remove the
     calibration programs pbmtpg and calibrate, if they are in your
     path, and  also rename or delete /etc/pnm2ppa.conf, and
     /etc/pbm2ppa.conf if they exist.

  To check for this, the command



  which pnm2ppa




  will find the first instance of pnm2ppa  in your path.

  Now begin the installation. First install the pnm2ppa RPM:


       rpm -Uvh pnm2ppa-0.8.9pre1-1.i386.rpm




  The pnm2ppa executable gets installed in /usr/bin/.

  If you are using a  2.2.x kernel, (Red Hat 6.x, Mandrake 6.x, etc.)
  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.  If it is not detected, 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_pp 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 which driver (new, pnm2ppa, or
  old, pbm2ppa) to test, and whether to print a test page, a calibration
  page, or a color calibration page (for the color driver only).

  o  Tip: The test_ppa script does not use the print filters that will
     be installed by 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.


  Once you have confirmed you have a working printer, install the RPM
  rhs-printfilters (either the Red Hat version rhs-
  printfilters-1.57-4ppa1.i386.rpm or the Mandrake version rhs-
  printfilters-1.58-4ppa1.i386.rpm) which are PPA-enhanced versions of
  the package that comes with Red Hat 6.1 or Mandrake-7.0, respectively:


       rpm -Uvh rhs-printfilters-1.57-4ppa1.i386.rpm




  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
  mentioned above to /etc/conf.modules).  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

  o  HP DeskJet 1000 series (PPA) (for 1000Cse, 1000Cxi models)

  o  HP DeskJet 710/720 series (PPA) (for 710C, 712C, 720C, 722C models)

  o  HP DeskJet 820 series (PPA) (for 820Cse, 820Cxi models)

     Select the appropriate entry for your printer model. You will then
     be presented with various options:

  o  The Driver Description box contains information about the driver
     (you may have to use the scrollbar at the right of the box to read
     it all).


  o  The resolution box shows a single resolution (600x600).  There are
     no other choices.

  o  The Paper Size box allows various choices (only letter, legal, and
     a4 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.

  o  The Color Depth/ Uniprint Mode box allows various selections of
     color and print quality (These are achieved by using  various
     combinations of the 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 are:

  o  Black and White, economy mode (--bw --eco)

  o  Color, economy mode (--eco)

  o  Color, economy mode, black ink disabled (-p --eco)

  o  Black and White, high quality (--bw )

  o  Color, high quality

  o  Color, high quality, black ink disabled (-p)

  o  Black and white, old pbm2ppa driver

  o  The three Printing options are not relevant here, and should not be
     selected. They are for direct printing of text (ascii) to non-
     postscript printers, but since the only way of printing text files
     with pnm2ppa is by first converting them to postscript(tm), this is
     not possible on the PPA printer.

  o  It is important that the choice "Fast text printing (non-PS
     printers only)" is NOT selected, so that the print filters will
     convert text files to postscript before printing.

  o  The Margins entries control the margins used when printing text
     files (these are instructions to the text-to-postscript conversion
     process).

  o  The Extra GS options box is not only a place for adding options for
     ghostscript, but also for pnm2ppa.  Leave this box empty unless you
     know what you are doing.  As explained in the text in the Driver
     Description box (you did read it, didn't you ?),  the entry should
     be  in the format:



       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 com-
  mand line (hopefully, these two sources of information will be consis-
  tent with each other!); pbm2ppa options are also displayed in this
  way.  One option that might be useful is "fast dither" (Extra GS
  options: PPA --fd ) which prints color faster, by using a lower-qual-
  ity "fast dithering" technique.

  When you have made your choices, click on Ok to save your selections
  and close the "Configure Filter" screen, and then click  on OK to
  close the "Edit Local Printer Entry" screen.

  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.

  The user-adjustable parameters are:

  o  xoff and yoff: the x-offset and y-offset of the printed image on
     the page, which should be chosen so the image is correctly centered
     on the paper.

  o  top, bottom, left, right: the four margins, which define the
     distances from the edges of the paper to the printable region.


  o  ColOffsX and ColOffsY: the  x-offset and y-offset between  the
     color image produced by the color ink printer head, and that
     produced by the black ink printer head.

  o  RedGammaIdx, GreenGammaIdx, and BlueGammaIdx: the are the three
     ``gamma'' parameters that define the empirical color correction
     curves for red, green, and blue.   Changing these will affect how
     colors are mixed.

  At present, the procedures for fine-tuning these parameters are
  primitive.  The offsets and margins are measured in pixels, and the
  default resolution (and the only one at present) is 600  pixels per
  inch.  Use test_ppa to print the test pages or calibration patterns to
  adjust the offsets. (see the document CALIBRATION for more
  information).


  The empirical color correction curves  defined by the three gamma
  parameters will be entirely replaced by user-created curves in a file
  /etc/pnm2ppa.gamma, if it exists.  A graphical utility ppagammacorrect
  for creating custom color correction curves, and  writing the results
  to a pnm2ppa.gamma file, is available at http://www.sourceforge.net
  but is in the early stages of development.

  Various command line options give extra control over the defaults used
  by pnm2ppa and pbm2ppa, and 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 plans 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?).



  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 the archives, at http://www.httptech.com/ppa.

  There are Public Forums for posting questions and comments at
  http://www.sourceforge.net (but whether you get any help from these,
  depends on whether anyone is reading them).















































