Overview
--------
This file contains some quick notes on installation in general.  

Compilation
-----------
To build pnm2ppa, simply cd to the source directory, and type:

make 

If you have NetBSD or FreeBSD, you'll need to edit the Makefile to include
an additional library (libgnugetopt) which pnm2ppa requires.
Also edit the Makefile to select compilation for BeOS.

There is some internationalization (i18n) of the system log messages.
Edit the Makefile to choose a language other than English.

Installation
------------

Two binaries are created: calibrate and pnm2ppa.  calibrate is used to
calibrate your printer (the default calibrations should work okay,
but you might want to tweak them).  See the CALIBRATION file for details.

The other binary created, pnm2ppa, is a converter from a PBM
image to a stream of PPA data that can be sent directly to the printer.
The PNM image *must* have a resolution of 600 dpi.  These files can be
generated with ghostscript.  The binary-output pbmraw, pgmraw, pnmraw devices
are supported (the text-output pbm, pnm, pgm devices are also supported, but
the raw devices are MUCH faster!).   

The pnmraw and pgnmraw devices are switches that will try to select among 
the raw formats, as appropriate for the document, but do not always make 
the correct choice.

You should now type 

make install

to install the binaries (by default, in /usr/local/bin/) , 
the manpage (in /usr/local/man/man1), and the sample
configuration file (/etc/pnm2ppa.conf).  You may change these locations
by editing the Makefile.


    *** IMPORTANT ***

You **MUST** now edit /etc/pnm2ppa.conf to  at least remove the line
"version ERROR", and choose the correct printer version (720, 820, 1000, etc)
before you can do anything with pnm2ppa.

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 the Printing System.
-------------------------------------
You can also set up a printer filter.  See the documentation for
your print spooler for information on how to do that, or look in
INSTALL.SUSE for an example lpd print filter for Postscript and text
files.

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.








