Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 2014 18:44:03 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        freebsd-questions@freebsd.org, Beeblebrox <zaphod@berentweb.com>
Subject:   Re: printcap configuration problem
Message-ID:  <alpine.BSF.2.11.1407181837460.29137@wonkity.com>
In-Reply-To: <20140719015149.1cb323c2.freebsd@edvax.de>
References:  <1405676044178-5929730.post@n5.nabble.com> <alpine.BSF.2.11.1407180554080.77290@wonkity.com> <1405689027711-5929805.post@n5.nabble.com> <20140719015149.1cb323c2.freebsd@edvax.de>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1407181837460.29137>