SUMMARY: printcap for HP jetdirect

From: Lam Tak Ming <tmlam_at_se.cuhk.edu.hk>
Date: Thu, 26 Sep 1996 09:53:20 +0800 (HKT)

Hi managers,

Thanks for the responses from
  "WHITTAKER, Bruce" <bjw_at_anto.gov.au> and
  "Henning Eli Lang" <hl_at_fiol.brock.dk>
for their advice on making a DU box to act as a print server.

Both of them point to the same solution which is to use two print queues
in order to make a DU box to act as a print server. One of them will be
used by users and the input filter will redirect the actual printing to
the second print queue. The key point is to make the system believes
that the first print queue is local and so the input filter will be
activated. The second print queue use the rm and rp printcap entries
to define the actual print server (the HP printer).

Below are their parts of their originals:
-------------------------------------------------------------------
From: "WHITTAKER, Bruce" <bjw_at_ansto.gov.au>

I had done something similar over here once before and the answer is
actually somewhat screwy. You need to convince UNIX that it the printer
is physically connected to the machine before it will use the filters.
This is probably a feature that is left over from the days when all
printers had to have a computer physically connected to them - so that
computer would do the filtering.

I did the following to fix the problem....

#This calls hpfilter which then prints to b53lsrx
b53lsr|hp-serial|lp1|1|hpjet|B53lsr|B53LSR|b53LSR:\
        :br#19200:\
        :ct=dev:\
        :fc#0177777:\
        :fs#03:\
        :if=/usr/local/etc/hpfilter:\
        :lf=/usr/adm/lp1err:\
        :lp=/dev/null:\
        :mx#0:\
        :of=/usr/lib/lpdfilters/ln03rof:\
        :lo=lock:\
        :pl#66:\
        :pw#80:\
        :rw:\
        :sd=/usr/spool/lpd1:\
        :uv=4.0:\
        :sh:\
        :xc#0177777:\
        :xf=/usr/lib/lpdfilters/xf:\
        :xs#044000:
# This prints straight to the printer. It is called by lp1
b53lsrx|lp2|2:\
        :lp=:\
        :rm=hpjet:\
        :rp=lp0:\
        :mx#0:\
        :sd=/usr/spool/lpd2:

So what is happening is that the first spool runs my filter program
(hpfilter) and then directs the print job to /dev/null. The filter
program then processes the input and prints back out to the second spool
which then goes to the remote printer.

--------------------------------------------------------------------------
From: "Henning Eli Lang" <hl_at_fiol.brock.dk>

I've experienced the same kind of problem. I my case the problem was
to direct the print to a Novell remote printer. I also found out that
using the rm and rp option neglected the if field in the printcap.

What I've found for a solution was to use a "dummy" printcap entry
for the remote printer, and for the real printer I use a shell script
,which invoked the print filter ( /usr/local/bin/pcl5 ) and piped the output to the dummy
printer:

The printcap file:

dummy:
      rm=novell1:rp=113:sd=/usr/spool/dummy
real
      if=/usr/local/bin/sh_it <any parameter>:

( I've removed the none interesting things from the above file )

The /usr/local/bin/sh_it looks like this

#!/bin/sh
cat | /usr/local/bin/pcl5 $* | lpr -Pdummy

--------------------------------------------------------------------------

Thanks again.

Regards,

TM Lam
Received on Thu Sep 26 1996 - 04:10:05 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:47 NZDT