Date: Sat, 9 Jan 2016 15:37:12 +0100 From: Bertram Scharpf <lists@bertram-scharpf.de> To: freebsd-questions@freebsd.org Subject: Re: Printer question Message-ID: <20160109143712.GA94931@becker.bs.l> In-Reply-To: <20160109143456.74f48f42.freebsd@edvax.de> References: <5690FCED.7000401@bananmonarki.se> <20160109143456.74f48f42.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Saturday, 09. Jan 2016, 14:34:56 +0100, Polytropon wrote: > On Sat, 9 Jan 2016 13:28:29 +0100, Bernt Hansson wrote: > > I have a question about laserjet printers that support HPGL. > > > > How do one switch from ps/pcl/pjl to hpgl the code for doing so under > > dos is Ec%#B where # is 0 or 1. > > > > But how to do that with a print filter? > > /usr/bin/printf "Ec%1B" || exit 2 First, it is not "Ec" (Letters E and c) but an escape (ASCII 0x1b). Second, the correct way to switch from PJL to another language is to say something like print "@PJL ENTER LANGUAGE = HPGL2\r\n" Probably it's a good idea to ensure you're in PJL mode before giving PJL commands. print "\e%-12345X@PJL\r\n@PJL ENTER LANGUAGE = HPGL2\r\n" Maybe it could be even possible to go the whole way round to PJL, from there to PCL and then to HPGL. print "\e%-12345X@PJL\r\n@PJL ENTER LANGUAGE = PCL\r\n\e%1B" You can see some output like that when you give the command $ echo "showpage" | gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ljet4pjl -r600 -sOutputFile=- - | less I will not tie myself to an exact answer because I do not know which printer model you're using. Just play around until you found a solution that works. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160109143712.GA94931>