I have FreeBSD 5.2-CURRENT. /etc/printcap hp2200:\ :sh:\ :rm=hp2200:\ :sd=/var/spool/output/lpd/hp2200:\ :mx#0:\ :if=/usr/local/libexec/hpif2:\ :lf=/var/log/lpd-errs: /usr/local/libexec/hpif #!/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=31-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 you 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. Has someone already completed such a thing?
On Wed, 31 Dec 2003 13:04, pixfbsd wrote:> I have FreeBSD 5.2-CURRENT. > > /etc/printcap > hp2200:\ > > :sh:\ > :rm=hp2200:\ > :sd=/var/spool/output/lpd/hp2200:\ > :mx#0:\ > :if=/usr/local/libexec/hpif2:\ > :lf=/var/log/lpd-errs: > > /usr/local/libexec/hpifI 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 added. If some how it is added ahead of the filter you could edit the filter to 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=31-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 you > 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
At 8:34 PM -0600 12/30/03, pixfbsd wrote:> >In the dfA009exampleFile in /var/spool/output/lpd/hp2200 >there is the value @PJL SET DATE=31-12-2003. I want to ... >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".Huh. I didn't realize they did that via PJL commands. Luckily we tend to send postscript, and I don't think we've ever hit one of those expiration messages. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu