Date: Mon, 14 Sep 2015 13:30:36 +0200 From: Polytropon <freebsd@edvax.de> To: Warren Block <wblock@wonkity.com> Cc: reg@dwf.com, freebsd-questions@freebsd.org Subject: Re: (Thanks) network/Postscript Printer problem Message-ID: <20150914133036.4a325347.freebsd@edvax.de> In-Reply-To: <alpine.BSF.2.20.1509132131140.83335@wonkity.com> References: <201509130653.t8D6rLr8006399@deneb.dwf.com> <55F564D6.3090106@bananmonarki.se> <20150913142321.293c85e2.freebsd@edvax.de> <201509132148.t8DLm1UY015441@deneb.dwf.com> <alpine.BSF.2.20.1509132131140.83335@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Sep 2015 21:33:54 -0600 (MDT), Warren Block wrote: > On Sun, 13 Sep 2015, reg@dwf.com wrote: > > > > > Thanks to all that responded, I finally got rid of > > a couple of nasty typos, and the printer is working. > > > > I should be able now to put together a couple of > > input filters to do single/double sided printing. > > This thread in the forums is a couple of years old, but shows some > examples of creating a duplex-printing filter: > https://forums.freebsd.org/threads/lpd-print-filters.40651/ To enrich the mailing list with some examples, I'd like to share my own "printer filter" for duplex functionality. :-) I have defined two printers, "Laserjet" and "Laserjer-nodup" in /etc/printcap, created their spool directories and made them almost identical, except for the printer filters, which themselves are almost identical, as you'll see: This is the duplex filter: /opt/libexec/ps2pcl-dup.sh #!/bin/sh /usr/bin/printf "\033&k2G" || exit 2 /usr/local/bin/gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER -dSAFER \ -sDEVICE=ljet4d -sPAPERSIZE=a4 -r600x600 \ -dDuplex=true \ -sOutputFile=- - && exit 0 exit 2 And this is the simplex filter: /opt/libexec/ps2pcl-nodup.sh #!/bin/sh /usr/bin/printf "\033&k2G" || exit 2 /usr/local/bin/gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER -dSAFER \ -sDEVICE=ljet4d -sPAPERSIZE=a4 -r600x600 \ -sOutputFile=- - && exit 0 exit 2 However, those filters translate the input PS to output PCL. I did this because the printer in question (HP Laserjet 4000 DN) will print PCL faster than PS. That's the only reason. You need to install the Ghostscript port (gs) for this task. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150914133036.4a325347.freebsd>