From owner-freebsd-questions@FreeBSD.ORG Sun May 4 20:35:56 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07DB264F for ; Sun, 4 May 2014 20:35:56 +0000 (UTC) Received: from pukruppa.de (pd95cabe3.dip0.t-ipconnect.de [217.92.171.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "pukruppa.de", Issuer "pukruppa.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 87B731B91 for ; Sun, 4 May 2014 20:35:55 +0000 (UTC) Received: from pukruppa.de (localhost [127.0.0.1]) by pukruppa.de (8.14.8/8.14.8) with ESMTP id s44KZqW0041022; Sun, 4 May 2014 22:35:52 +0200 (CEST) (envelope-from ulrich@pukruppa.de) Message-ID: <5366A4A8.1030501@pukruppa.de> Date: Sun, 04 May 2014 22:35:52 +0200 From: Peter Ulrich Kruppa User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Warren Block Subject: Re: lpr / ghostscript problem: blank page at end of each print job [solved] References: <5366768B.6070608@pukruppa.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 20:35:56 -0000 On 05/04/14 21:35, Warren Block wrote: > On Sun, 4 May 2014, Peter Ulrich Kruppa wrote: > >> Hi, >> >> I am playing around with a host based Windows printer (Brother >> HL-2135W), which seems to understand some PCL . >> >> Converting .ps or .pdf files with ghostscript and printing the result >> via lpr works so far. > > What is the full gs command? > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing-lpd.html#printing-lpd-filters-ps2pcl Thanks for the hint - I just typed this /usr/local/libexec/ps2pcl #!/bin/sh /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sPAPERSIZE=a4 -dBATCH -sDEVICE=hl1250 -s OutputFile=- - (all in one line) chmoded it to 555 and wrote into my /etc/printcap lp:\ :lp=/dev/ulpt0:\ :sh:\ :mx#0:\ :sd=/var/spool/lpd/lp:\ :if=/usr/local/libexec/ps2pcl:\ :lf=/var/log/lpd-errs: restarted /etc/rc.d/lpd and now no additional blank page is created anymore as before, when I used gs manually. > > >> Problem is, there always will be a blank page printed out at the end of >> a print job. >> I tried to suppress this with lpr -h option, but that wouldn't help. >> >> Does anyone have any good idea? > > Does the extra page print if the file is dumped directly to the printer? > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing-direct.html > > > Do plain text files print correctly? Is there an input filter in the > printcap entry for the printer, and if so, what does the filter do? No, I have to run enscript to create a ps before. Thanks and greetings Peter