Printer question

Bertram Scharpf lists at bertram-scharpf.de
Sat Jan 9 14:37:23 UTC 2016


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 at PJL\r\n at 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 at PJL\r\n at 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


More information about the freebsd-questions mailing list