From owner-freebsd-questions@FreeBSD.ORG Sat Jul 19 00:44:11 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 5FE5CD1D for ; Sat, 19 Jul 2014 00:44:11 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AED021B9 for ; Sat, 19 Jul 2014 00:44:10 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s6J0i446057244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 18 Jul 2014 18:44:04 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s6J0i3Dm057241; Fri, 18 Jul 2014 18:44:04 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 18 Jul 2014 18:44:03 -0600 (MDT) From: Warren Block To: Polytropon Subject: Re: printcap configuration problem In-Reply-To: <20140719015149.1cb323c2.freebsd@edvax.de> Message-ID: References: <1405676044178-5929730.post@n5.nabble.com> <1405689027711-5929805.post@n5.nabble.com> <20140719015149.1cb323c2.freebsd@edvax.de> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 18 Jul 2014 18:44:04 -0600 (MDT) Cc: freebsd-questions@freebsd.org, Beeblebrox 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 00:44:11 -0000 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. 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. >> Also, I do not find any way of defining resolution (r=), quality (q=) and >> orieantation (m=) in printcap, and the job ends up using the default printer >> settings (excluding the a4 parameter which is sent from host) - so I >> logically come back to the filter file... > > Those are usually defined _in_ or _for_ the printer filter. CUPS > manages those sufficiently well. The web interface is slow to use, > but if you can get used to it, changing parameters is easy. There > are also configuration files located in /usr/local/etc/cups, and > finally there's lpadmin. These can also be set by having the filter modify the PostScript file.