From owner-freebsd-stable@FreeBSD.ORG Tue Dec 30 21:08:36 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E005316A4CE for ; Tue, 30 Dec 2003 21:08:36 -0800 (PST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 557F743D1D for ; Tue, 30 Dec 2003 21:08:35 -0800 (PST) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp109-47.lns1.adl1.internode.on.net [150.101.109.47])hBV58Up5017519; Wed, 31 Dec 2003 15:38:30 +1030 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: pixfbsd , stable@freebsd.org Date: Wed, 31 Dec 2003 15:38:29 +1030 User-Agent: KMail/1.4.3 References: <1072838049.5571.8.camel@viper.dlqj.net> In-Reply-To: <1072838049.5571.8.camel@viper.dlqj.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200312311538.29609.malcolm.kay@internode.on.net> Subject: Re: printer job date change X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2003 05:08:37 -0000 On Wed, 31 Dec 2003 13:04, pixfbsd wrote: > I have FreeBSD 5.2-CURRENT. > > /etc/printcap > hp2200:\ > > :sh:\ > :rm=3Dhp2200:\ > :sd=3D/var/spool/output/lpd/hp2200:\ > :mx#0:\ > :if=3D/usr/local/libexec/hpif2:\ > :lf=3D/var/log/lpd-errs: > > /usr/local/libexec/hpif I notice that the actual filter referenced in printcap is hpif2; not hpif. I would have expected that this would be where the PJL command is=20 added. If some how it is added ahead of the filter you could edit the filter to=20 pass the input though sed to change the date in the PJL command to whatever you want. > #!/bin/sh > # > # hpif - Simple text input filter for lpd for HP-PCL based printers > # Installed in /usr/local/libexec/hpif > # > # Simply copies stdin to stdout. Ignores all filter arguments. > # Tells printer to treat LF as CR+LF. Ejects the page when done. > > > printf "\033&k2G" && cat && printf "\033&l0H" && exit 0 > exit 2 > > In the dfA009exampleFile in /var/spool/output/lpd/hp2200 there is the > value @PJL SET DATE=3D31-12-2003. I want to create a filter that will > change that value to the year 2000. > > Why? If you recall HP has date information in their printer cartridges= , > that after a certain date the cartridge becomes "expired". Although yo= u > have plenty of ink or a cartridge that has been on the shelf for along > time. > > If I manually vi the file I can print, therefore I was trying to find a > filter that would send the PJL command to set the date to a default > 01-12-2000 all the time. > Malcolm Kay