How to make lpd printers use filters ?

How to make lpd printers use filters ?

Post by Dean Carpent » Fri, 17 Mar 1995 03:26:07



We have several HP printers here using their JetDirect cards for network
access.  Each printer has its own IP address, and the software to provide
basic LPD services.

I want to define /etc/printcap entries to access these remote printers and
to provide filtering *before* the job is sent over the wire.  A sample
entry is below :

# HP Laser jet 3Si Postscript output
lpps:\
        :lp=:\
        :sd=/usr/spool/lpd/lansup1:\
        :mx#0:\
        :rm=lansup1:\
        :rp=ps:\
        :of=/var/spool/lpd/lansup1/hpps:\
        :lf=/var/spool/lpd/lansup1/hp-log:

Remember that the printer itself is providing the lpd services.  The only
problem is that as far as I know, no local filters will be used, but
rather the job will passed to the remote lpd, which is supposed to do
any necessary filtering.  hpps never gets called, either as an :of: or
as an :if:

Unfortunately, the HP Laserjet LPD on the JetDirect is just a spooler - no
provision for filtering.  So how can I do filtering locally and still send
the job directly to the printer ?  Basically, I want to process postscript
files with ghostscript->ljet3/pcl.

Thanks -

Dean

 
 
 

How to make lpd printers use filters ?

Post by Lawrence LeM » Sat, 18 Mar 1995 13:15:15


< text deleted>

Quote:>Remember that the printer itself is providing the lpd services.  The only
>problem is that as far as I know, no local filters will be used, but
>rather the job will passed to the remote lpd, which is supposed to do
>any necessary filtering.  hpps never gets called, either as an :of: or
>as an :if:

>Unfortunately, the HP Laserjet LPD on the JetDirect is just a spooler - no
>provision for filtering.  So how can I do filtering locally and still send
>the job directly to the printer ?  Basically, I want to process postscript
>files with ghostscript->ljet3/pcl.

Grab a copy of hpdriver from ftp.cs.umn.edu and edit it to do what you need.
Its a C source code program, which will handle sending the file to the
printer using tcp/ip (you cannot do what you want using rp and rm
entries)..

-Lawrence LeMay

PS: Whups, forgot to mention, its in directory users/lemay

 
 
 

1. lpd: cannot execv .. printer filters

Slackware 4.0 setup right off the CD, 2.0.6 kernel.

Firstly, I've been running a Linux box for very long time and am
neither blushing virgin nor newbiw. Nevertheless I can't get lpd
filters to work.

The lpd system works fine when sending "raw" files to the printer..
provided I don't have an if: filter in printcap. When I do, I'm
seeing the following in the syslog:

Jun 23 18:23:08 musica lpd[354]: cannot execv /var/spool/lp1/test/input_filter

What am I looking for???

Here's the relevant printcap entry:

test|testnec:\
        :lp=/dev/null:\
        :sd=/var/spool/lp1/test:\
        :lf=/var/spool/lp1/test/errs:\
        :if=/var/spool/lp1/test/input_filter:\
        :mx#0:\
        :sh:

Here are the relevant spooler permissions:

drwx------   2 root     lp           1024 Jun 23 18:23 test/

/var/spool/lp1/test:
total 3
-rw-r--r--   1 root     lp             18 Jun 23 18:23 lock
-rw-rw-r--   1 root     lp             27 Jun 23 18:23 status
-rwxr-xr-x   1 root     lp            222 Jun 22 19:19
input_filter*
-rw-r--r--   1 root     lp              0 Jun 19 12:40 errs

Here is input_filter:

#/bin/sh
echo ------------------------------- >>/tmp/test.nec
date                                 >>/tmp/test.nec
echo ------------------------------- >>/tmp/test.nec
cat                                  >>/tmp/test.nec

Obviously this is a trivial filter.. makes no difference, I get
that same "cannot execv" error in syslog.

What am I looking for?
--


  Richard J. Wyble

2. US FL ORL WWW WEB Network Eng HB&CO

3. lpd filtering for remote printers

4. Geforce with Linux ( s.u.s.e. )

5. How can LPD filters be set up for remote printers?

6. POSIX standard

7. lpd filtering for remote printers

8. Help! Mouse problems

9. Help required writing a lpd/printer filter

10. need help on Sun 4/110 (4.1) => PS printer lpd filter

11. lpd filtering remote printer?

12. printer accounting and filters (lpd)

13. LPD filters and remote printers.