SUMMARY: lpd print filter : how it works ?

Date: Sun Jul 16 1995 - 22:00:46 CDT

Thanks for the numerous responses from the list. This list is great.

Nearly all said that the print filters are not applied when printing to
remote printers. Filtering is done on the remote host (the print server).
The filters only work on locally connected printers.

Because my remote printer is an Emulex network printer, I can not put the
filter there (the LPD server is built into the network printer device).
There are two methods to get around the problem. Both
methods trick the lpd daemon to think that it is printing to a local printer.
Method 1 works wonderfully for me.

Method 1: (suggested by Mike Cross at
           and John Valdes at

All you have to do is read a real queue, outputing to /dev/null or to a
dummy device such as mknod /dev/lpprinter c 3 2. This
will then execute your input filter. The filter script then has to queue
the job to the remote printer queue. i.e

lp0 a real execution queue, which outputs to /dev/null, and has an
        input filter called fred.

lp1 a remote queue pointing to the real printer queue

the filter script fred would be
        cat - | /usr/local/bin/as2ps > /tmp/file.$$
        lpr -Plp1 /tmp/file.$$
        rm /tmp/file.$$

whre as2ps is the ascii to postscript converter.

In my case, the printcap entry would be



Method 2: (suggested by Dave Fetrow at

Use the program from HP which connects a pseudo tty to the remote
printer. As far as the workstation is concerned the printer is connected
locally. The remote printer gets its info over lpd. The workstation does
the spooling. Get it from

I have not tried this method yet. But it makes me think and reread the
Emulex printer manual. The Emulex also has a network socket program which
acts as an output filter to a dummy print device (eg /dev/null). It talks
to the remote print server and send the job to the remoted lpd.

As I mentioned before, Method 1 works great for me and is simple. So I
used it.

Thanks for the responses from these people.

Ian MacPhedran
Zenon Dewicki
Mike Cross
Dave Fetrow
Stuart Pearlman
Torben Lauritsen
Bill Holzapfel
Bismark Espinoza
Bob Corbett
Thad Macmillan
John Valdes

Dr Hiep Duc, Metropolitan Air Quality Study**
Environment Protection Authority NSW (EPANSW)* ------------------------ *
66 Rickard Road * *
Bankstown, NSW 2200 ph: (02) 7955205 * *
   ph: (02) 795 5454 Fax: (02) 7092836 * *

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:29 CDT