Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: LaBonte <labonte@zk3.dec.com>
Subject: Re: Printer filter
Date: 2000/01/05	[thread overview]
Message-ID: <38735283.651B2E84@zk3.dec.com> (raw)
In-Reply-To: 38725431.E9502406@dassic.com


If the printer has a network interface you can probably use tcp/ip
printing, provided in V4.0a, eliminating the need for two queues.
A tcp/ip print queue looks similar to a parallel port queue with the
exception of LP. For example:

        :lp=@printer.name.com/port_9100:\

Port_9100 is defined in the /etc/services file. ie:

        port_9100       9100/tcp

FYI, 9100 is the port/socket number used for HP and Lexmark printers.

Using this setup you have a direct network connection to the printer with
full print filter functionality. Printcap example:

lp|lp0|0:\
        :ct=tcp:\
        :af=/usr/adm/lpacct_lp0:\
        :if=/usr/lbin/pcfof +Cgeneric_text.pcf:\
        :lf=/usr/adm/lperr_lp0:\
        :lp=@my_printer/port_9100:\
        :mx#0:\
        :of=/usr/lbin/pcfof +Cgeneric_text.pcf:\
        :pl#66:\
        :pw#80:\
        :sd=/usr/spool/print/lp0:\
        :xf=/usr/lbin/xf:



---------------------
Jesper Frank Nemholt wrote:

> Mustafa Demirbilek wrote:
> >
> > I have an application that produces aoutput for a dot matrix printer. Some
> > characters have to be replaced before they are sent to the printer. I tried
> > to add lines to /etc/printcap (if, of, etc) but could not succeed.
> >
> > Does anybody have experience with filters?
>
> Sure.
>
> If the printer is a remote printer, filtering won't work with if/of. The
> trick in this case is (or can be) to make two queues, a local fake and
> the real remote. Print to the local and let it call a if/of script that
> translates the characters, and then at then end prints the result to the
> remote queue. It's ugly but it works.
> If you need to make a general solution, you can transfer parameters to
> the if script using the af option. It's not intended for this use, but
> again... it works. It'll show up as paramter $8 in the if script.
>
> If you need an example I can post one. I have a ES40 cluster with about
> 400 printers configured like this.
>
> I've never quite understood why if/of doesn't work with remote queues,
> anyone ?
>
> Will Advanced Printing solve some of these issues ?
>
> l8r/Jspr




  parent reply	other threads:[~2000-01-05  5:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-04  5:00 Printer filter Mustafa Demirbilek
2000-01-04  5:00 ` Jesper Frank Nemholt
2000-01-05  5:00   ` Sue Gleeson
2000-01-10  5:00     ` Forskningsing. vid Maskinsektionens DataCentral
2000-01-05  5:00   ` LaBonte [this message]
2000-01-10  5:00     ` Jesper Frank Nemholt
2000-01-11  5:00       ` LaBonte
2000-01-05  5:00 ` LaBonte
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