Before you do an installation, you should read the following instructions. You will need to:
HOWTO/IFHP-HOWTO.{ps,html,text,...}
file(s).
You are doing this now, so you are off to a good start.ifhp
filter with the working print spooler.In addition, you might want to get the following software,
which can be used with
ifhp
.
http://www-inf.enst.fr/~demaille/a2ps/ This package does a very good job of text to PostScript conversion.
http://www.gnu.org/ This package is a simpler version of a2ps, and is faster and smaller.
ftp://ftp.astron.com/pub/file/ or ftp://ftp.deshaw.com/pub/file/.
The ifhp
filter uses the autoconf
configuration facility.
This facility will determine your system type,
set compilation flags,
and initialize shell and make variables that determine where your
software will be installed.
You should be aware of the following variables used by configure
.
default installation directories:
${prefix} is usually /usr/local
${exec_prefix} is usually ${prefix} (/usr/local)
${libexecdir} is usually ${exec_prefix}/libexec (/usr/local/libexec)
${sysconfdir} is usually ${prefix}/etc (/usr/local/etc)
${mandir} is usually ${prefix}/man (/usr/local/man)
We install the components in:
${libexecdir}/filters/ ifhp, ofhp, etc
${sysconfdir}/ifhp.conf - configuration file
${mandir}/man8/ifhp.8 - man pages
These defaults are the most useful when you are installing software
on a new system.
Suppose you wanted to install in
/usr/lib/filters
,
/etc
,
and
/usr/share/man
.
Then you would use:
configure --libexecdir=/usr/lib/filters --sysconfdir=/etc --mandir=/usr/share/man
It is highly unlikely that you will encounter problems with compilation. Usually these are due to type definition conflicts in include files. If you encounter these, please report these to the LPRng mailing list.
configure
make all
# installs ifhp and textps in ${libexecdir}# installs ifhp.conf in ${sysconfdir} (if not present)
# and in ${sysconfdir}/ifhp.conf.sample
make install
There are over 500 different printer models, types and configurations supported by IFHP. If your printer is not currently supported, then report this to the LPRng Mailing List and more than likely support will be added.
In order to support a printer,
the printer capabilities and its connection method must be told
to the ifhp
filter.
This information is known as a printer configuration,
and the printer configuration databases is stored in the
ifhp.conf
configuration file.
The particular entry or printer model is accessed using the
ifhp
model
option.
The default printer configuration covers a wide range of network printers manufactured by Hewlett-Packard, Canon, Epson, and others and is for a printer that has the following capabilities:
pjl
).ps
).pcl
).text
, default_language=pcl
).banner@
)status
)sync
)pagecount
)In addition to HP printers,
there is also generic support for
PostScript only printers
(/tt/ps/),
Tektronics Phasers (tek
),
Tektronics Phasers
(tek
),
QMS
printers (qms
),
and others.
The HP DeskJet and DesignJet printers
hpdj
prefix with the model appended.
These provide additional configuration information,
such as limitations on printing capability,
etc.
apple hp5 hpdj1600c hpdj750cplus
hp4 hp5l hpdj200 hpdj755cm
hp4000 hp5m hpdj2000cp hpiiisi
hp4l hp5mp hpdj220 hpljpro
hp4lc hp5p hpdj230 hppjxl300
hp4m hp5si hpdj2500cp lexmark4039
hp4ml hp5simopier hpdj250c phaser
hp4mp hp5simx hpdj330 postscript
hp4mplus hp6l hpdj350c ps
hp4mv hp6mp hpdj430 qms1725
hp4p hp6p hpdj450c qms2025
hp4pj hp8100 hpdj455ca qms2060
hp4plus hpcolorlj hpdj600 qms860
hp4si hpcolorlj5 hpdj650c tek
hp4simx hpcolorlj5m hpdj700
hp4v hpdj1200c hpdj750c default
The basic LPRng printcap configuration is:
# printer setup
# force clients (lpr, lpq, to use server)
lp:lp=lp@serverhost
# server information
lp:server
:sd=spooldir
:...
# version 1 - using -T options
#path to ifhp filter
:if=/.../ifhp -Tmodel=model,options
:of=/.../ifhp -Tmodel=model,options
# version 2 - using ifhp printcap entry
:ifhp=model=model,options
:if=/.../ifhp
:of=/.../ifhp
As shown,
options can be passed on the command line using the
-Toption,option
method or put into the
:ifhp=option,option
list.
There can be multiple -T
options on a command line,
but only a single
:ifhp
printcap entry.
Since commas are used to separate options in the
-T
option list,
separate values with a semicolon.
You will need to quote this on a command line:
ifhp "-Tconfig=/usr/local/etc/ifhp.conf;/var/spool/ifhp.conf"
As shown in the example above,
you specify the printer model by using the
-Tmodel=
This is the most common configuration, and the printcap entry would have the following format. The actual port for a direct connection to the printer may vary. For HP JetDirect print spooling support it is 9100. For others, please consult the manufacturers documentation for details.
# printer setup
# force clients (lpr, lpq, to use server)
lp:lp=lp@serverhost
# server information
lp:server
:sd=spooldir
:...
#:lp=printer ip address or DNS name%9100
# eg - :lp=nwpr%9100
# eg - :lp=10.1.1.1%9100
:lp=10.1.1.1%9100
#path to ifhp filter
:ifhp=model=name
:if=/.../ifhp
:of=/.../ifhp
If your printer is actually a parallel or serial port printer
and is attached to an external Network Print Spooler unit,
then even though the connection to the Network Print spooler is
bidirectional,
no status information will be returned from the printer.
In this case you should use status@
option to tell ifhp not to expect status.
This is done using:
lp:server
:...
:ifhp=status@,model=name
Since the parallel port is unidirectional,
you cannot get status back from the printer when queried for it,
may need to use the
status@
option to prevent the
ifhp
filter from expecting it.
You must not specify the
:rw
(open connection read-write) printcap option.
The printcap entry would have the following format:
# printer setup
# force clients (lpr, lpq, to use server)
lp:lp=lp@serverhost
# server information
lp:server
# no :rw option!
:sd=spooldir
:...
# parallel port
:lp=/dev/lpt
:ifhp=status@
#path to ifhp filter
:if=/.../ifhp
:of=/.../ifhp
The LPRng print spooler will open and set the serial
line characteristics,
and pass the open connection to the
ifhp
filter.
The
tty
connection must pass all 8 bits with no parity,
and should use hardware flow control if at all possible.
for your system,
# printer setup
# force clients (lpr, lpq, to use server)
lp:lp=lp@serverhost
# server information
lp:server
:sd=spooldir
:...
# serial port
:lp=/dev/ttyxxx
:stty=38400 -echo -crmod -raw -oddp -evenp \
ixon pass8 -ixany cbreak crtscts
#path to ifhp filter
:if=/.../ifhp
:of=/.../ifhp
Use the configuration appropriate to the printer connection,
and then specify
model=ps
.
# printer setup
# force clients (lpr, lpq, to use server)
lp:lp=lp@serverhost
# server information
lp:server
:sd=spooldir
:...
:ifhp=model=ps
#path to ifhp filter
:if=/.../ifhp
:of=/.../ifhp
If you have a parallel port printer with no PostScript support, you would use:
:ifhp=model=ps,status@
If your printer does not like PostScript EOJ (Control-D)
flags at the start of a job,
use the
no_ps_eoj
(
No PS EOJ at Start) flags.
flag to remove them.
:ifhp=model=ps,no_ps_eoj
If ifhp.conf
can be configured to invoke a text to PostScript converter.
See the section on
File Utility and Conversion
capability.
The Tektronics Phaser Series printers and QMS printers use the Appsocket protocol when sending a job to the printer. This protocol is (briefly):
The ifhp
program supports the appsocket
protocol.
In order to do so,
the following ifhp configuration entry can be used.
[ tek ]
appsocket
pjl@
pcl@
[ qms ]
appsocket
qms
pjl@
pcl@
The appsocket
option will use the appsocket protocol,
and cause ifhp
to open and close connections to the printer.
The qms
option will cause the same number port to be
used for the TCP/IP and UDP port.
The printcap entry should specify
lp=/dev/null
and provide the device IP address using the -Tdev=host%port
option.
# Phaser Setup
lp:server
:lp=/dev/null
:sd=spooldir
:...
:ifhp=model=tek,dev=10.0.0.1%9100
#path to ifhp filter
:if=/.../ifhp
:of=/.../ifhp
If the ifhp
filter needs to invoke a conversion filter then the conversion
process can take a considerable amount of time.
Since the output of the filter is not sent until the filter completes,
then no job information will get sent to the printer.
This can lead to a filter timeout.
If this is a problem,
then the appsocket
protocol
and the appsocket protocol can be hideously abused
and the reopen_for_job
option used order to solve
this problem.
The following printcap entry is used:
# Phaser Setup
lp:server
:lp=/dev/null
:sd=spooldir
:...
:ifhp=model=printer,dev=10.0.0.1%9100,appsocket,reopen_for_job
#path to ifhp filter
:if=/.../ifhp
:of=/.../ifhp
The appsocket
option forces a connection to be made to the printer.
The reopen_for_job
option will force the connection to be re-established
immediately before any data is sent.
This will, in effect, terminate the waiting connection and force
a new one to be made.