  PPA Printer calibration for pnm2ppa
  The pnm2ppa project team ppa-rpms@users.sourceforge.net
  v0.1, July 11,  2000

  Information and instructions for printer calibration using  pnm2ppa.
  http://sourceforge.net/projects/pnm2ppa (Updated for pnm2ppa-1.0 and
  later.)

   OOvveerrvviieeww ooff PPrriinntteerr CCaalliibbrraattiioonn..

  There are three tasks you may need to carry out to fine-tune your PPA
  printer:

  +o  Adjust the x-offset and y-offset to ccoorrrreeccttllyy cceenntteerr tthhee pprriinntteedd
     ppaaggee oonn tthhee ppaappeerr

  +o  Adjust the relative offsets between black and colored ink printing
     - tthhiiss sshhoouulldd bbee ddoonnee eeaacchh ttiimmee yyoouu rreeppllaaccee aann iinnkk ccaarrttrriiddggee.

  +o  Match the colors of printed images to some other output device -
     this is ccoolloorr ccoorrrreeccttiioonn and is described in COLOR.html (or
     COLOR.txt).

  These instructions assume that you are already able to print
  postscript files with your PPA printer.   If your print filters are
  properly configured, something like "lpr test.ps" will successfully
  invoke ghostscript and pnm2ppa to print the postscript file test.ps.
  Alternatively, you may be using shell scripts like "lprbw", "lprcolor"
  and "lpreco" supplied with the pnm2ppa source code, and modified by
  you for your defaults; you may also have defined special printing
  devices in /etc/printcap, e.g.  a "coloreco" device so you print with
  lpr -P coloreco  test.ps.    These details vary with the operating
  system and distribution you use.


   ((11)) CCeenntteerriinngg tthhee pprriinntteedd ppaaggee oonn tthhee ppaappeerr..

  This is done by adjusting the x-offset and y-offset parameters xoff
  and yoff in the pnm2ppa configuration file (usually
  /etc/pnm2ppa.conf).   The parameters are given in units of 1/600 inch;
  increasing xoff  moves the image to the right, and increasing yoff
  moves it downwards.  These offsets now have default values defined for
  each printer model, and you will probably not need to adjust them.
  Uncomment and make small adjustments to the default values for these
  in the configuration file, until the printout is satifactory.  (You
  can also edit the  defaults.h file and recompile pnm2ppa, or use the
  '-x' and '-y' command-line parameters.)


  There are two ways to check the offsets.

  +o  The easy way: pprriinnttiinngg aa ssuuiittaabbllee tteesstt ppaaggee.

  +o  An older way: uussiinngg tthhee ""calibrate" program.

  On Red Hat or Mandrake Linux distributions, a suitable test  page is
  /usr/lib/rhs/rhs-printfilters/testpage.ps (US Letter paper) or
  /usr/lib/rhs/rhs-printfilters/testpage-a4.ps (A4 paper).   (If these
  are not available, similar test pages are supplied in the tarball
  distribution pnm2ppa-1.0.tar.gz).  These pages have margins drawn at
  standard distances from the edges of the paper, and can easily be used
  to check the centering.


  The "calibrate" program  is a stand-alone program distributed with
  pnm2ppa which creates a calibrated grid pattern in the raw pixmap
  format accepted by pnm2ppa. (The three paper sizes, US Letter,  US
  Legal, and A4, are supported).  If your paper size is A4, and your
  printer filter accepts the "-l" (direct output) option to lpr, the
  command to run is:
   calibrate -a4  | pnm2ppa  -i -  -o - | lpr -l.  (Substitute "letter"
  or "legal" for "a4" to change the papersize; if no paper size is
  specified, it is assumed to be letter.)  If "lpr -l" is not valid, you
  need to know  which port your printer is attached to.   Assuming it is
  /dev/lp0, the above command becomes
   calibrate  | pnm2ppa  -i -  -o  /dev/lp0.  The numerical values
  marking grid intersections are pixel coordinates.  Unfortunately,
  these coordinates are probably cut off before the edge of the paper.
  You'll have to use a ruler to estimate the pixel coordinate of the
  left and top edges of the actual sheet of paper (should be within +/-
  300, may be negative, there are 600 pixels per inch).  When properly
  calibrated, the center mark should be in the center of the paper.

   ((22)) CCaalliibbrraattiinngg tthhee XX aanndd YY CCoolloorr OOffffsseettss..

  The color ink offsets now have to be calibrated with respect to the
  black ink.  Because the relative position of the two ink cartridges
  can move slightly, tthhiiss mmuusstt bbee ddoonnee wwhheenneevveerr aann iinnkk ccaarrttrriiddggee iiss
  rreemmoovveedd aanndd rreeppllaacceedd.

  The calibration can be done by printing the test page test.ps (found
  in the tarball pnm2ppa-1.0.tar.gz; or installed with the pnm2ppa
  documentation. (This is often in /usr/doc/pnm2ppa*/.)  The settings to
  change in the configuration file are CCoollOOffffssXX and CCoollOOffffssYY, again in
  units of 1/600 inch.

  On the printout you see several images:

  +o  top left, you see a square with both black and colored items.
     These should align correctly, or you have to change your settings.

  +o  You see a large vertical bar, and also a horizontal bar.  On the
     sides of the vertical  bar there are a blue and a green line.
     These should align with the 0 mark.

  +o  You also see a small vertical, and horizontal, bar, with a red bar
     on its side.

  If these items do NOT line up, you should take the following steps:

  +o  (1) take for the large bar the number of the tickmark just smaller
     than the place where the green and blue lines point to. The minor
     tick marks are 25 points.

  +o  (2) To this number, add the number of the tick mark at which a red
     tick mark exactly lines up. This might not work if the offsets are
     way off; in that case, apply the correction of step 1, and print
     again.

  +o  (3) Add the horizontal offset to the value of CCoollOOffffssXX, and the
     vertical offset to the value of CCoollOOffffssYY in the configuration file.

  Now you can print test.ps again to see whether this procedure worked.

  OOtthheerr aaddjjuussttmmeennttss

  Many of these are documented in the sample configuration file.

  If bidirectional printing causes "shearing" of vertical lines
  (horizontal offsets of those parts of the line printed by left-to-
  right print-head sweeps relative to those printed on right-to-left
  sweeps) you can make small adjustments (in 1/600 inch) units using the
  bbllaacckksshheeaarr and ccoolloorrsshheeaarr parameters in the configuration file.  You
  can also suppress bidirectional printing with the uunniimmooddee=1 parameter.

  The parameter bbllaacckknneessss adjusts the number of black ink drops printed
  per pixel.  It takes values 1, 2, 3, or 4 (2 is the default).  Other
  values, like 0, suppress black ink.




























































