Next Previous Contents

PPA Printer calibration for pnm2ppa

The pnm2ppa project team ppa-rpms@users.sourceforge.net

v0.4, October 28, 2000


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

Overview of Printer Calibration.

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

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) Centering the printed page on the paper.

This is done by adjusting the x-offset and y-offset parameters xoffset and yoffset in the pnm2ppa configuration file (usually /etc/pnm2ppa.conf). The parameters are given in units of 1/600 inch; increasing xoffset moves the image to the right, and increasing yoffset 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 satisfactory. (You can also use the '-x' and '-y' command-line parameters.)

There are two ways to check the offsets.

The "calibrate_ppa" program is a stand-alone program distributed with pnm2ppa which creates various test patterns 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_ppa -s a4  --center  | pnm2ppa --bw  -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_ppa -s a4 --center | pnm2ppa --bw -i - -o /dev/lp0.

The pattern shows distances from the edge of the printed page in units of 50 dots (1/12 inch), and diagonal lines that should point to the corners. Change xoffset and yoffset in the configuration file (usually /etc/pnm2ppa.conf to center the pattern. The configuration file is supplied with commented-out entries like #xoffset 160 showing the default value. Remove the "#" to activate the entry.

In 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 pnm2ppa source distribution.) These pages have margins drawn at standard distances from the edges of the paper, and can also be used to check the centering, but are not as accurate

(2) Calibrating the X and Y Color Head Offsets.

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, this must be done whenever an ink cartridge is removed and replaced.

To print an alignment calibration pattern on a4 paper, run

calibrate_ppa -s a4  --align | pnm2ppa --fd  -i - -o - | lpr -l

On the printed page, there are four alignment patterns, corresponding to configuration file parameters ColOffsX, ColOffsY, colorshear and blackshear. The central alignment patterns, labelled "0" should be perfectly aligned. If they are not, first correct the shearing patterns, (see below). Then identify the best-aligned ColOffsX and ColOffsY patterns, and add or subtract the positive or negative number below the pattern from the value in the configuration file.

Check the result by printing the alignment test pattern:

calibrate_ppa  --test | pnm2ppa -fd  -i - -o - | lpr -l
The lines in the cross and square should be perfectly straight now.

The calibration can also 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*/.)

On the printout you see several images:

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

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

Shearing adjustments

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 blackshear and colorshear parameters in the configuration file. You can also suppress bidirectional printing with a unimode 1 configuration file entry.

The third and fourth lines on the color head offset calibration page (see above) correspond to color and black print head shearing corrections. If the central alignment patterns (labeled "0") are not aligned, add or subtract the positive or negative number below the best-aligned pattern from the colorshear and blackshear values in the configuration file.

Cleaning the Print Heads

You can use calibrate_ppa to clean the print heads by printing patterns that exercise all the ink nozzles:

calibrate_ppa  --clean | pnm2ppa -p   -i - -o - | lpr -l
calibrate_ppa  --clean | pnm2ppa --bw  -i - -o - | lpr -l
The first of these commands prints a cleaning pattern with colored ink, the second uses black ink.

Other adjustments

The parameter blackness 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.

Inks can also be suppressed by configuration file entries black_ink 0, color_ink 0, cyan_ink 0, magenta_ink 0, or yellow_ink 0. These are mainly useful for debugging the printer driver.


Next Previous Contents