From owner-freebsd-questions Sun Apr 20 11:56:19 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id LAA06106 for questions-outgoing; Sun, 20 Apr 1997 11:56:19 -0700 (PDT) Received: from cedb.dpcsys.com (cedb.DPCSYS.com [209.25.4.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA06101 for ; Sun, 20 Apr 1997 11:56:17 -0700 (PDT) Received: from localhost (dan@localhost) by cedb.dpcsys.com (8.8.5/8.8.2) with SMTP id SAA01658; Sun, 20 Apr 1997 18:55:22 GMT Date: Sun, 20 Apr 1997 11:55:21 -0700 (PDT) From: Dan Busarow To: "Joshua M. Free" cc: freebsd-questions@FreeBSD.ORG Subject: Re: HP Deskjet 660Cse In-Reply-To: <19970420125406.52716@verdi.jlc.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 20 Apr 1997, Joshua M. Free wrote: > When printing with 'lpr' I'll either get a single blank page or the > text I was trying to print except that it has the "staircase effect". > Here's the contents of /etc/printcap: > lp|HP Deskjet 660Cse:\ > :lp=/dev/lpt0:sh:sd=/var/spool/lpd/lp:\ > :lf=/var/log/lp.log: Add an input filter. From the Handbook #!/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. Writes a form feed character # after printing job. printf "\033&k2G" && cat && printf "\f" && exit 0 exit 2 Here is an example /etc/printcap from a host called orchid. It has a single printer attached to its first parallel port, a Hewlett Packard LaserJet 3Si named teak. It is using the above script as its text filter: # # /etc/printcap for host orchid # teak|hp|laserjet|Hewlett Packard LaserJet 3Si:\ :lp=/dev/lpt0:sh:sd=/var/spool/lpd/teak:mx#0:\ :if=/usr/local/libexec/hpif: Dan -- Dan Busarow 714 443 4172 DPC Systems / Beach.Net dan@dpcsys.com Dana Point, California 83 09 EF 59 E0 11 89 B4 8D 09 DB FD E1 DD 0C 82