From: sterne@dublin.llnl.gov (Philip Sterne)
Subject: Re: printcap output filters
Date: 1996/01/10 [thread overview]
Message-ID: <sjd98r949p.fsf@dublin.llnl.gov> (raw)
In-Reply-To: 4d0ge3$lkf@chaos.dac.neu.edu
Chris> I'd be very interested in talking to others who have done
Chris> this or otherwise gotten JetDirect cards working with OSF1 3.2c
Chris> lpd. I have several hundred of these printers I need to talk to
Chris> from OSF.
Here is the printcap entry I'm using:
# HP Laserjet Network printer, raw port.
lp1:\
:lf=/usr/adm/lp1err:\
:lp=:\
:mx#0:\
:rm=machine.address.gov:\
:rp=raw:\
:sd=/usr/spool/lpd1:
This prints postscript and PCL. To get text as well, there are two
simple options, neither of which is entirely satisfactory:
1. Define another printcap entry to point to the text queue on the
JetDirect card:
# HP Laserjet Network printer, text port.
lp2:\
:lf=/usr/adm/lp2err:\
:lp=:\
:mx#0:\
:rm=machine.address.gov:\
:rp=text:\
:sd=/usr/spool/lpd2:
This gives you two separate queues with two printcap entries for
the printer, one for raw input (PCL, postscript, HPGL2), the other
for ASCII text. You have to remember to use the right queue to
print the appropriate sort of file.
2. Locally run a filter to convert text to postscript or PCL as a
wrapper around your lpr command. You can do this with a one-liner
along the lines of
/usr/lbin/hplaserof < filename | lpr -Plp1
which you can make a shell script, if you are so inclined. I've
called mine lprt, and stuck it in /usr/local/bin. Now you have
just one printcap entry for the printer, but different commands to
print raw and text files.
As another poster has already noted, the if and of parameters are
ignored if the rm parameter is defined in the printcap file; it is
assumed that the appropriate filtering will be done at the "host"
computer that has the direct connection to the printer.
Unfortunately, since the remote print queue is directly on the
LaserJet, the only way we can control filtering at the "host" end in
this case is by firing the job at the appropriate queue.
But you aren't using an rm flag in your printcap; as I understand it,
you are using the filter itself to do the printing. If you can get
your approach to work, it would provide a third option, with just a
single command and a single printcap entry, which would be very nice.
Maybe there is a way to make it work by setting some other flags
differently, e.g. define lp=/dev/null so the lpd command has somewhere
to dump whatever output comes from the filter (doesn't work; I tried
it). If you find a way to make it work, please let us know.
Phil
--
---------------------------------------------------------------------
Philip Sterne | sterne@dublin.llnl.gov
Lawrence Livermore National Laboratory | Phone (510) 422-2510
Livermore, CA 94550 | Fax (510) 422-7300
next prev parent reply other threads:[~1996-01-10 5:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-10 5:00 printcap output filters Chris Johnson
1996-01-10 5:00 ` Philip Sterne [this message]
1996-01-12 5:00 ` Boyd Adamson
1996-01-10 5:00 ` Charles Richmond
1996-01-22 5:00 ` Greg Merrell
-- strict thread matches above, loose matches on Subject: below --
1996-01-14 5:00 Ralf Puchner
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox