From owner-freebsd-questions@FreeBSD.ORG Sun May 29 19:06:18 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C9B416A41C for ; Sun, 29 May 2005 19:06:18 +0000 (GMT) (envelope-from modelt20@canada.com) Received: from n016.sc0.cp.net (fh020.dia.cp.net [64.97.160.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F86243D49 for ; Sun, 29 May 2005 19:06:17 +0000 (GMT) (envelope-from modelt20@canada.com) Received: from smtp.sc0.cp.net (64.97.131.2) by n016.sc0.cp.net (7.0.038) (authenticated as modelt20@canada.com) id 4288F8890024EABF; Sun, 29 May 2005 19:06:07 +0000 Received: from [24.208.85.39] by mail.canada.com with HTTP; Sun, 29 May 2005 12:06:06 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: wblock@wonkity.com From: modelt20@canada.com X-Sent-From: modelt20@canada.com Date: Sun, 29 May 2005 12:06:06 -0700 (PDT) X-Mailer: Web Mail 6.1.7-3.4_1 Message-Id: <20050529190607.29117.fh052.wm@smtp.sc0.cp.net> Cc: freebsd-questions@freebsd.org Subject: Re: Adding a FormFeed to an LPR printcap file? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2005 19:06:18 -0000 Hello: Thank you for your reply. My if filter follows: #!/bin/sh # # kx-p1124 - Print Ghostscript-simulated Postscript on a Panasonic KX-P1124 # installed in /usr/local/bin/kx-p1124 # # Read first two characters of the file # IFS="" read -r first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then # # It is Postscript; use Ghostscript to scan-convert and print it. # /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=lj \ -sOutputFile=- - && exit 0 else # # Plain text or HP/PCL, so just print it directly; print a form feed # at the end to eject the last page. # echo "$first_line" && cat && exit 0 fi exit 2 As you can see, there is nothing special about this. I am suspecting I need to add a printf "0x0c" between the last && cat and the && exit 0 just before the fi. Thanks in advance for your help. Harold. On Sat, 28 May 2005 18:47:41 -0600 (MDT), Warren Block wrote: > > On Fri, 27 May 2005 modelt20@canada.com wrote: > > > Could someone suggest a way to add a form feed to the > > end of a print document in LPR? I have a printer that > > doesn't eject the last page when the print job is > > finished; and I can't seem to find this in the manual. > > > > My guess is I need to add it to my printer filter, but > > its not clear to me what I need to add. > > What printer filter do you have now? > > -Warren Block * Rapid City, South Dakota USA