From owner-freebsd-questions@FreeBSD.ORG Tue Dec 16 20:44:45 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4AC5106564A for ; Tue, 16 Dec 2008 20:44:45 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 389E98FC13 for ; Tue, 16 Dec 2008 20:44:44 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id mBGKiIFD062678; Tue, 16 Dec 2008 21:44:18 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id mBGKiIRd062675; Tue, 16 Dec 2008 21:44:18 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Tue, 16 Dec 2008 21:44:18 +0100 (CET) From: Wojciech Puchar To: Polytropon In-Reply-To: <20081216214051.4d0cfcf6.freebsd@edvax.de> Message-ID: <20081216214258.D62674@wojtek.tensor.gdynia.pl> References: <20081216214051.4d0cfcf6.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: luizbcampos , freebsd-questions@freebsd.org Subject: Re: LPRng x pdf files 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: Tue, 16 Dec 2008 20:44:46 -0000 > > Or you can use gv's or xpdf's print option which should place > the PDF file's content into the printer job queue. > > If your printer is PostScript capable, you could eventually > use pdf2ps and then feed the PS directly into the printer. if not - ghostscript processes both ps and pdf example filter for my laserjet 4 (minimally modified default) #!/bin/sh # # ifhp - Print Ghostscript-simulated PostScript on a DesJet 500 # Installed in /usr/local/libexec/hpif # # Treat LF as CR+LF: # printf "\033&k2G" || exit 2 # # Read first two characters of the file # read 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 -sPAPERSIZE=a4 -sDEVICE=ljet4 -sOutputFile=- - \ && exit 0 else # # Plain text or HP/PCL, so just print it directly; print a form # at the end to eject the last page. # echo "$first_line" && cat && printf "\f" && exit 0 fi exit 2