Before you do an installation please read the following instructions. You will need to:
ifhp is developed and tested with the GNU C compiler.
You can get it from
http://www.gnu.org/software/software.html.
Solaris users should consult the excellent
http://sunfreeware.com
site for binary distributions.The following software is recommended for use with ifhp.
If your printer does not support PostScript, PCL, or text printing directly
you will need to install GhostScript to convert from PostScript to the printer
format and use a suitable text to PostScript converter.
The ifhp filter will recognize that a file
is PostScript, PJL, or PCL by examining the first
couple of bytes of a file and applying a simple set of rules.
If you require more elaborate file type detection then you can
configure ifhp to also use the UNIX file utility
if it is unable to determine the file type.
See
ftp://ftp.astron.com/pub/file/
to obtain this software.
http://www.astart.com/LPRng.html
The ifhp filter works best with the later versions of this software,
and the two are developed as an integrated unit.
http://www.cs.wisc.edu/~ghost/index.html or http://www.ghostscript.com If your printer does not handle PostScript and you need to print PostScript, GhostScript is used to convert PostScript to a format usable by the printer.
If your printer is a PostScript only printer or you wish to have enhanced formatting capability for documents, then you will need a text to PostScript converter. http://www-inf.enst.fr/~demaille/a2ps/ This package does a very good job of text to PostScript conversion. It also makes use of the file utility to determine the required conversions.
http://www.gnu.org/
This package is an alternative to a2ps,
but requires careful handling due to the exit codes it produces.
Please see
Wrappers For Programs for details on how to use
enscript with ifhp.
This program is included with the ifhp distribution
and is an extremely primitive text to PostScript filter.
It generates PostScript compatible with even the most ancient
of PostScript printers and is useful where
a2ps and enscript are just too modern.
See
http://www.astart.com/LPRng.html.
The psutils package
developed by Angus Duggan is available from
ftp://ftp.dcs.ed.ac.uk/pub/ajcd/.
These are a collection of programs for manipulation of
PostScript files,
and include facilities for doing page selection,
page reversal, n-up printing, and watermarking.
The netcat utility is extremely useful when trying to
send files to a network printer and you need to monitor its
activity.
Developed by hobbit@avian.org, it is available from
ftp://avian.org/src/hacks/nc110.tgz.
The installation procedure uses the configure
facility to generate Makefiles.
By convention,
these files have the following variables that install
the ifhp executables and configuration files
in the following locations:
default installation directories:
Variable Value
${prefix} /usr/local
${exec_prefix} ${prefix}
${bindir} ${exec_refix}/bin
${sbindir} ${exec_prefix}/sbin
${libexecdir} ${exec_prefix}/libexec
${sysconfdir} ${prefix}/etc (/usr/local/etc)
${mandir} ${prefix}/man (/usr/local/man)
The following files are installed as shown below:
Name Type Location
ifhp executable ${libexecdir}/filters/ifhp
ifhp.conf configuration ${sysconfdir}/ifhp.conf
ifhp.1 man pages ${mandir}/man1/ifhp.1
First, we untar, configure, compile, and install the software:
gunzip -c ifhp-<release>.tgz |tar xvf -
cd ifhp-<release>
# for /usr/local/libexec/filters/ifhp,
# /usr/local/etc/ifhp.conf
# /usr/local/man/man1/ifhp.1
./configure
OR
# for /usr/libexec/filters/ifhp,
# /etc/ifhp.conf
# /usr/share/man/man1/ifhp.1
./configure --prefix=/usr --sysconfdir=/etc/ --mandir=/usr/share/man
make clean all
su root
make install
Modify your printcap file to use ifhp.
Your printcap usually has the following format;
older version of lpd require :\ at the end of each
line of a printcap entry.
The :if and :of filter entries are usually the ones of interest.
lp:
:lp=xxxx:sd=xxxx:....
:if=/usr/local/path_to_old_filters/old_if_filter
:of=/usr/local/path_to_old_filters/old_of_filter
Your new printcap entry will look like the one below.
The MODEL information is described in the next section.
lp:
:lp=xxxx:sd=xxxx:....
# see text for details about the next line
:ifhp=model=MODEL,status@
:if=/usr/local/libexec/filters/ifhp
:of=/usr/local/libexec/filters/ofhp
The configuration file
(/usr/local/etc/lpd.conf
or
/etc/lpd.conf)
contains a set of entries describing printer
capabilities and requirements.
Each of these is described by a model name.
The following is a partial list of models supported:
apple hp4v hpdj1200c hpdj750c
hp4 hp5 hpdj1600c hpdj750cplus
hp4000 hp5l hpdj200 hpdj755cm
hp4500 hp5m hpdj2000cp hpiiisi
hp4l hp5mp hpdj220 hpljpro
hp4lc hp5p hpdj230 hppjxl300
hp4m hp5si hpdj2500cp lexmark4039
hp4ml hp5simopier hpdj250c lj3pclonly
hp4mp hp5simx hpdj330 phaser
hp4mplus hp6l hpdj350c postscript
hp4mv hp6mp hpdj430 ps
hp4p hp6p hpdj450c qms1725
hp4pj hp8100 hpdj455ca qms2025
hp4plus hpcolorlj hpdj600 qms2060
hp4si hpcolorlj5 hpdj650c qms860
hp4simx hpcolorlj5m hpdj700 tek
pclonly pcl_ps_conversion
ghostscript gs
If you have a PostScript only printer,
you should use the ps model.
If you have a PCL only printer,
then pclonly is recommended.
If you want to process PostScript files,
then install GhostScript in /usr/local/bin/gs,
and use pcl_ps_conversion.
The other model entries are used when specific printer functionality or features is needed. For example, if you want to do accounting or use landscape mode, then you should check for your specific printer model in the configuration file.
Shut down and restart your print spooler and then send a job to the printer.
If this works and you do not need any further capabilities of ifhp
such as error reporting or printer monitoring,
then you are finished.
If you want to use additional capabilities, then you should read the detailed instructions in the next couple of sections.