From owner-freebsd-questions@FreeBSD.ORG Sat Jul 19 15:20:22 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 0E542601 for ; Sat, 19 Jul 2014 15:20:22 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C34E023CE for ; Sat, 19 Jul 2014 15:20:21 +0000 (UTC) Received: from r56.edvax.de (port-92-195-69-249.dynamic.qsc.de [92.195.69.249]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id D533124C5D; Sat, 19 Jul 2014 17:13:47 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s6JFDkU2001916; Sat, 19 Jul 2014 17:13:46 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 19 Jul 2014 17:13:46 +0200 From: Polytropon To: Warren Block Subject: Re: printcap configuration problem Message-Id: <20140719171346.712611fa.freebsd@edvax.de> In-Reply-To: References: <1405676044178-5929730.post@n5.nabble.com> <1405689027711-5929805.post@n5.nabble.com> <20140719015149.1cb323c2.freebsd@edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2014 15:20:22 -0000 On Fri, 18 Jul 2014 18:44:03 -0600 (MDT), Warren Block wrote: > On Sat, 19 Jul 2014, Polytropon wrote: > > > This is an example of how I have been working (outside of CUPS), > > the /opt/libexec/ps2pcl-dup.sh filter: > > > > #!/bin/sh > > /usr/bin/printf "\033&k2G" || exit 2 > > /usr/local/bin/gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER \ > > -dSAFER -sPAPERSIZE=a4 -r600x600 \ > > -sDEVICE=ljet4d -dDuplex=true \ > > -sOutputFile=- - && exit 0 > > exit 2 > > > > You can see that I've been using gs (ghostscript) with the options > > defining the required paper size (ISO A4) and resolution (600 dpi). > > The printer driver used by gs is "ljet4d" which works with the > > HP LaserJet 4000 DN I'm still using. > > The LJ4000 is a PostScript printer. In fact, it has many personalities, PS is one of them. It also handles PCL, and additionally ASCII. Therefore it has a multiple personality disorder, but that's actually fine, because each of them has its advantage. Personalities can be selected at the operator panel of the printer. Setting AUTO usually causes the correct output to appear. > The trick of modifying the incoming > PS file to set the page size will be faster. Here, gs has to build and > send a multi-megabyte bitmap. I found that using PS directly is slower than using gs, but I'm going with this solution with just works (TM) for many years now. The reason might be that I also had other printers in the same location (HP Laserjet 4, Lexmark Optra something, Kyocera FS-600) which all understand the gs-generated data without me having to change anything. That's a very lazy man's solution, I know. :-) Currently I'm using CUPS with a PPD file, so I think things are kept in PS the whole way (PPD used to modify PS). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...