Usage
-----
To print a postscript file with this program, You may use a simple
shell script:
#!/bin/sh
cat $1 | \
gs -sDEVICE=ppmraw -sPAPERSIZE=letter -q -dNOPAUSE -r600 -sOutputFile=- - | \
pnm2ppa $2 $3 $4 $5 $6 $7 -i - -o - | lpr -l
Any valid ghostscript papersize like "legal", "a4", etc.
can be substituted for "letter"
(in fact, "letter" is the default, so the "-sPAPERSIZE=letter" is
not really needed.)
If this script is placed in /usr/local/bin/ppaprint ,
ppaprint file.ps
will print the postscript file file.ps in high quality color. Other
options are:
ppapprint file.ps --eco // economy color ink mode
ppaprint file.ps --bw // black and white
ppaprint file.ps --bw --eco // black and white economy mode
etc. In the example, up to six pnm2ppa options can be added (see
"man pnm2ppa" to list options, or "pnm2ppa --h" ).
You may wish to replace the ghostscript output device "ppmraw" with
"pbmraw" for only black and white printing - it is somewhat faster -
or "pgmraw" for greyscale images.
an ascii file could be printed in black and white with the script
#!/bin/sh
enscript -2rj $1 | \
gs -sDEVICE=pbmraw -sPAPERSIZE=letter -q -dNOPAUSE -r600 -sOutputFile=- - | \
pnm2ppa --bw $2 $3 $4 $5 $6 $7 -i - -o - | lpr -l
Integration into Printing Systems
-----------------------------------
(A) lpr, LPRng systems
You can set up printer filters. See the documentation for
your print spooler for information on how to do that.
The subdirectory lpd of the pnm2ppa distribution contains a
printer description file "printcap" and so filters to go with it.
See the README.lpd file there.
The subdirectory ppaSet of the pnm2ppa distribution contains a
software to help configuring the printer (and better, for each user in the
system), for both GTK and ncurses. Just see README file there. This
software is fully compatible with the previous one, not a replacement.
On some Linux distributions, (RedHat, Mandrake, ... etc.), packages
that install pnm2ppa and appropriate printer filters will be available
to do all this for you. On others, you must do this manually, for
example using the files in our lpd subdirectory. See lpd/README.lpd
in the pnm2ppa source distribution.
Note: the "foomatic" data base at
http://www.linuxprint.org now supports
pnm2ppa, and produces scripts for configuring lpd-based systems. RedHat
use this system since RedHat 7.2
An older printfilter system for lpd systems that also supports pnm2ppa is
apsfilter (
http://www.apsfilter.org).
---------------
(B) PDQ ("Print, Don't Queue")
PDQ is an alternative, spooler-free printing system
available from
http://pdq.sourceforge.net
The pdq subdirectory of the pnm2ppa source provides a pdq driver, gs-pnm2ppa
----------------
(C) CUPS ("Common Unix Printing System")
pnm2ppa is now integrated into the CUPS printing system:
see
http://www.cups.org. The "cupsomatic" scripts from the
http://www.linuxprinting.org site support pnm2ppa on CUPS.
"ppaSet": a Graphical User Interface for configuring pnm2ppa:
-------------------------------
There is also a new graphical (gtk-based) utility for creating
a pnm2ppa.conf configuration file and also can act as a front end to the
calibration utility calibrate_ppa. It is written by Javier Sedano,
and called ppaSet. Find it at
http://sourceforge.net/projects/pnm2ppa.