  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

   _O_v_e_r_v_i_e_w _o_f _H_P_'_s _P_P_A _D_e_s_k_J_e_t _P_r_i_n_t_e_r_s_.

  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  _D_e_s_k_J_e_t _7_1_0_C _S_e_r_i_e_s: HP DeskJet 710C, 712C

  +o  _D_e_s_k_J_e_t _7_2_0_C _S_e_r_i_e_s: HP DeskJet 720C, 722C

  +o  _D_e_s_k_J_e_t _8_2_0_C _S_e_r_i_e_s: HP DeskJet 820Cxi, 820Cse _(_d_i_s_c_o_n_t_i_n_u_e_d_)

  +o  _D_e_s_k_J_e_t _1_0_0_0_C _S_e_r_i_e_s: HP DeskJet 1000Cxi, 1000Cse _(_d_i_s_c_o_n_t_i_n_u_e_d_)

  feature ``Host-based'' printing, and use HP's proprietary PPA (_P_r_i_n_t_e_r
  _P_e_r_f_o_r_m_a_n_c_e _A_r_c_h_i_t_e_c_t_u_r_e) 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 _p_n_m_2_p_p_a 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.





   _T_h_e _p_n_m_2_p_p_a _d_r_i_v_e_r _f_o_r _c_o_l_o_r _p_r_i_n_t_i_n_g _w_i_t_h  _P_P_A _p_r_i_n_t_e_r_s_.

  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 _p_o_r_t_a_b_l_e _p_i_x_m_a_p (_p_p_m) format images
  into a stream of PPA instructions which can be sent to the printer.
  In the driver name, ``_p_n_m'' stands for the superset of _t_h_r_e_e image
  formats: _p_p_m (portable ``pixmap'' format for color images), _p_g_m
  (portable ``greymap'' format for greyscale images), and _p_b_m (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 _p_p_m_r_a_w
  produces the pixmap format accepted by the new color driver pnm2ppa
  (the output device _p_b_m_r_a_w  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 _U_S _L_e_t_t_e_r (8.5"x11") size (letter);
  other supported paper sizes are _U_S _L_e_g_a_l (8,5"x14") size (legal) and
  _A_4 (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





   _A_v_a_i_l_a_b_l_e _R_P_M _p_a_c_k_a_g_e_s_.


  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  _p_n_m_2_p_p_a_:

  +o  pnm2ppa-0.8.9pre1-1.i386.rpm

  +o  _r_h_s_-_p_r_i_n_t_f_i_l_t_e_r_s:

  +o  rhs-printfilters-1.57-4ppa1.i386.rpm  for _R_e_d _H_a_t _6_._1

  +o  rhs-printfilters-1.58-4ppa1mdk.i386.rpm for _M_a_n_d_r_a_k_e _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.  _D_o _n_o_t _i_n_s_t_a_l_l _t_h_e _R_e_d _H_a_t  _R_P_M _o_n _M_a_n_d_r_a_k_e _s_y_s_t_e_m_s_:
  _u_s_e _t_h_e *mdk.i386.rpm package for Mandrake.


  +o  _N_o_t_e _f_o_r _M_a_n_d_r_a_k_e _u_s_e_r_s_: _M_a_n_d_r_a_k_e _i_n_c_l_u_d_e_s _a_n _o_l_d_e_r _a_t_t_e_m_p_t _a_t _P_P_A
     _s_u_p_p_o_r_t_, _w_h_i_c_h _m_a_y _b_e _i_n_c_o_m_p_a_t_i_b_l_e _w_i_t_h _t_h_i_s _o_n_e_.   _P_l_e_a_s_e  _u_s_e
     _t_h_eprinttool _t_o _d_e_l_e_t_e _a_n_y _i_n_s_t_a_l_l_e_d _P_P_A _p_r_i_n_t_e_r_s   _B_E_F_O_R_E
     _u_p_g_r_a_d_i_n_g rhs-prinfilters_.  _I_f _y_o_u _f_o_r_g_e_t _t_o _d_o _t_h_i_s_, _a_n_d _p_r_i_n_t_o_o_l
     _w_i_l_l _n_o_t _s_t_a_r_t _a_f_t_e_r _t_h_e _u_p_d_a_t_e_, _d_e_l_e_t_e _o_r _m_o_v_e _y_o_u_r/etc/printcap
     _f_i_l_e_.

  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/.)


   _I_n_s_t_a_l_l_i_n_g _t_h_e _R_P_M _p_a_c_k_a_g_e_s _a_n_d _s_e_t_t_i_n_g _u_p _t_h_e _P_P_A _p_r_i_n_t_e_r_.

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


  +o  _T_i_p_: _I_f _y_o_u _h_a_v_e _p_r_e_v_i_o_u_s_l_y _i_n_s_t_a_l_l_e_d _(_o_r _a_t_t_e_m_p_t_e_d _t_o _i_n_s_t_a_l_l_)
     _e_i_t_h_e_r pbm2ppa  _o_r pnm2ppa _b_y _c_o_m_p_i_l_i_n_g _i_t _y_o_u_r_s_e_l_f _f_r_o_m _a
     _"_t_a_r_b_a_l_l_"_, _y_o_u _s_h_o_u_l_d _f_i_r_s_t _d_e_l_e_t_e _o_r _m_o_v_e _t_h_e _o_l_d  pbm2ppa _o_r
     pnm2ppa _e_x_e_c_u_t_a_b_l_e_, _s_o _i_t _w_i_l_l _n_o_t _b_e _f_o_u_n_d _i_n _y_o_u_r _p_a_t_h (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  _T_i_p_: _T_h_e test_ppa _s_c_r_i_p_t _d_o_e_s _n_o_t _u_s_e _t_h_e _p_r_i_n_t _f_i_l_t_e_r_s _t_h_a_t _w_i_l_l
     _b_e _i_n_s_t_a_l_l_e_d _b_y rhs-printfilters _R_P_M_, _s_o _i_t _i_s _u_s_e_f_u_l _w_h_e_n
     _t_r_o_u_b_l_e_s_h_o_o_t_i_n_g _f_o_r _t_e_s_t_i_n_g _i_f _a_n_y _p_r_i_n_t_i_n_g _p_r_o_b_l_e_m_s _a_r_e _a_s_s_o_c_i_a_t_e_d
     _w_i_t_h _t_h_e _b_a_s_i_c _p_r_i_n_t_e_r _i_n_s_t_a_l_l_a_t_i_o_n_, _o_r _w_i_t_h _t_h_e _c_o_n_f_i_g_u_r_a_t_i_o_n _o_f
     _t_h_e _p_r_i_n_t _f_i_l_t_e_r_s_.


  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 "_R_e_d _H_a_t _L_i_n_u_x _P_r_i_n_t _S_y_s_t_e_m _M_a_n_a_g_e_r" (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 _A_d_d, then in the "Add a
  Printer Entry", select _L_o_c_a_l _P_r_i_n_t_e_r, and click _O_k. Hopefully, the
  port on which the printer is attached will be listed as ``Detected''
  (_i_f _n_o_t_, _f_i_x _t_h_e _p_r_o_b_l_e_m _b_e_f_o_r_e _c_o_n_t_i_n_u_i_n_g, perhaps by adding the line
  mentioned above to /etc/conf.modules).  You will now have to ``_e_d_i_t
  _t_h_e _l_o_c_a_l _p_r_i_n_t_e_r _e_n_t_r_y'' for the PPA printer.    Click on _S_e_l_e_c_t to
  chose the "Input filter".  The _C_o_n_f_i_g_u_r_e _F_i_l_t_e_r screen will open.
  Among the many printer entries in the list "_P_r_i_n_t_e_r _T_y_p_e", you should
  find three entries

  +o  _H_P _D_e_s_k_J_e_t _1_0_0_0 _s_e_r_i_e_s _(_P_P_A_) (for 1000Cse, 1000Cxi models)

  +o  _H_P _D_e_s_k_J_e_t _7_1_0_/_7_2_0 _s_e_r_i_e_s _(_P_P_A_) (for 710C, 712C, 720C, 722C models)

  +o  _H_P _D_e_s_k_J_e_t _8_2_0 _s_e_r_i_e_s _(_P_P_A_) (for 820Cse, 820Cxi models)

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

  +o  The _D_r_i_v_e_r _D_e_s_c_r_i_p_t_i_o_n 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 _r_e_s_o_l_u_t_i_o_n box shows a single resolution (600x600).  There are
     no other choices.

  +o  The _P_a_p_e_r _S_i_z_e box allows various choices (only _l_e_t_t_e_r, _l_e_g_a_l, and
     _a_4 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 _C_o_l_o_r _D_e_p_t_h_/ _U_n_i_p_r_i_n_t _M_o_d_e box allows various selections of
     color and print quality (These are achieved by using  various
     combinations of the pnm2ppa options _-_-_e_c_o (EconoFast mode), _-_p
     (disable black ink cartridge) and _-_-_b_w (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 _P_r_i_n_t_i_n_g _o_p_t_i_o_n_s are not relevant here, and should _n_o_t 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
     _n_o_t possible on the PPA printer.

  +o  _I_t _i_s _i_m_p_o_r_t_a_n_t _t_h_a_t _t_h_e _c_h_o_i_c_e "Fast text printing (non-PS
     printers only)" _i_s _N_O_T _s_e_l_e_c_t_e_d_, _s_o _t_h_a_t _t_h_e _p_r_i_n_t _f_i_l_t_e_r_s _w_i_l_l
     _c_o_n_v_e_r_t _t_e_x_t _f_i_l_e_s _t_o _p_o_s_t_s_c_r_i_p_t _b_e_f_o_r_e _p_r_i_n_t_i_n_g_.

  +o  The _M_a_r_g_i_n_s entries control the margins used when printing text
     files (these are instructions to the text-to-postscript conversion
     process).

  +o  The _E_x_t_r_a _G_S _o_p_t_i_o_n_s box is not only a place for adding options for
     ghostscript, but also for pnm2ppa.  _L_e_a_v_e _t_h_i_s _b_o_x _e_m_p_t_y _u_n_l_e_s_s _y_o_u
     _k_n_o_w _w_h_a_t _y_o_u _a_r_e _d_o_i_n_g.  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 "_f_a_s_t _d_i_t_h_e_r" (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 _O_k to save your selections
  and close the "Configure Filter" screen, and then click  on _O_K 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 _T_e_s_t_s menu,
  choose _P_r_i_n_t _P_o_s_t_s_c_r_i_p_t _t_e_s_t _p_a_g_e 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.




   _C_o_n_f_i_g_u_r_i_n_g _p_n_m_2_p_p_a_._c_o_n_f _a_n_d _c_a_l_i_b_r_a_t_i_n_g _t_h_e _p_r_i_n_t_e_r

  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  _x_o_f_f and _y_o_f_f: 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  _t_o_p, _b_o_t_t_o_m, _l_e_f_t, _r_i_g_h_t: the four margins, which define the
     distances from the edges of the paper to the printable region.


  +o  _C_o_l_O_f_f_s_X and _C_o_l_O_f_f_s_Y: 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  _R_e_d_G_a_m_m_a_I_d_x, _G_r_e_e_n_G_a_m_m_a_I_d_x, and _B_l_u_e_G_a_m_m_a_I_d_x: 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.



   _U_t_i_l_i_t_y _p_r_o_g_r_a_m_s _f_o_r _t_h_e _p_r_i_n_t_e_r_.

  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?).



  _C_o_n_t_a_c_t_i_n_g _t_h_e _p_n_m_2_p_p_a _p_r_o_j_e_c_t_.

  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).















































