From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,f4f8137c92629637 X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,f4f8137c92629637 X-Google-Attributes: gidfee84,public From: LaBonte Subject: Re: Printer filter Date: 2000/01/05 Message-ID: <38735283.651B2E84@zk3.dec.com>#1/1 X-Deja-AN: 570433552 Content-Transfer-Encoding: 7bit References: <38725431.E9502406@dassic.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: iass@lead.zk3.dec.com X-Trace: lead.zk3.dec.com 947081861 8153 16.140.32.102 (5 Jan 2000 14:17:41 GMT) Organization: UBPG Mime-Version: 1.0 NNTP-Posting-Date: 5 Jan 2000 14:17:41 GMT Newsgroups: comp.unix.osf.misc,comp.unix.osf.osf1 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