Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 May 2014 22:35:52 +0200
From:      Peter Ulrich Kruppa <ulrich@pukruppa.de>
To:        Warren Block <wblock@wonkity.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: lpr / ghostscript problem: blank page at end of each print job [solved]
Message-ID:  <5366A4A8.1030501@pukruppa.de>
In-Reply-To: <alpine.BSF.2.00.1405041329250.7760@wonkity.com>
References:  <5366768B.6070608@pukruppa.de> <alpine.BSF.2.00.1405041329250.7760@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5366A4A8.1030501>