README for IFHP
Patrick Powell <email@example.com>
Sun Oct 29 06:25:05 PST 1995
1. The following executables are available:
ifhp,ofhp - IF and OF filter
banner.sh - PCL banner printer (GNU AWK)
- ofhp is symbolic link to or copy of the ifhp filter
- if ifhp invoked as ofhp or with -Fo option, acts as OF filter
- 'ofhp -Tbanner' will print banners using banner.sh
2. The if filter will check the job files for printability and/or
postscript format. If it is PostScript, it will set the printer
to PostScript mode using the PCL commands, otherwise it will
set the printer to PCL. If you do not want this to happen,
then print the job as a binary file; this suppresses the checks.
Some LPR spoolers use the 'v' format to indicate a binary file;
If this is the case you will need to use the following printcap:
If your LPD server does not allow options in the filter spec,
use the following entry and the following shell script:
/usr/local/lib/filters/ifhp -c $*
2. ifhp takes the full range of LPD filter options, and uses or
or ignores them as applicable. The following command line options
-c - cleartext - dump this directly to the printer, no fonts,
no nothing done. For those desperate people trying to
find a way to print those obnoxious files
-sstatusfile - the name of a status file that is updated with
'rolling status' - i.e. - the last few log messages.
The statusfile value is set from the 'ps=statusfile' printcap
-nuser, -hhost, -Jjob - used by ofhp for banner printing defaults
-T[filteroptions,]* - filter options
See the ifhp man page for filteroption details.
3. The ifhp filter has the ability to download fonts to the printer.
The font downloaded is selected by the -Hhost option. The mapping is
controlled by the FONTDIR/host_fonts file, which has lines of the form:
See font/host_fonts.proto for details and examples.
The -Tfontdir=directory can be used to override the FONTDIR value
in the Makefile. The default is /usr/local/lib/filters/font.
4. Printer problems are reported using syslog(3)-
syslog( LOG_WARNING|LOG_LPR, msg);
consult the syslogd(8) man page for details of logging. The parameters
to syslog have been bombproofed and strings are less 80 bytes long.
The accounting procedures may appear rather strange to somebody who does
not come from an Academic environment where avoiding printer accounting
has long been a tradition. The following methods are used.
1. At the start of a job the page counter value is read from the
printer. Since this value is electromechanical, it is VERY difficult
to modify it through software :-)
The value is printed to the accounting file using a line of the form:
start -hhost -uuser -pcountervalue -Pprinter; see src/doaccnt.c
2. At the end of a job the counter is read again, and the usage calculted;
the following line is written to the accounting file:
end -bpages -hhost -uuser -pcountervalue -Pprinter
3. In addition, if the ACCNTSH value is not NULL and the file exists,
then the accounting shell script is invoked with a command line
of the form
ACCNT -bpages -hhost -uuser -pcountervalue -Pprinter [accntfile]
This may appear to be overkill, but it is not. Believe me, it is not.
Read the README.accounting for details.