From owner-freebsd-questions@freebsd.org Sat Jan 9 14:37:23 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E9EEA68BA1 for ; Sat, 9 Jan 2016 14:37:23 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3271F21 for ; Sat, 9 Jan 2016 14:37:22 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from becker.bs.l ([85.180.10.125]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0M6DsI-1ZyqJc13r0-00yBJp for ; Sat, 09 Jan 2016 15:37:14 +0100 Received: from bsch by becker.bs.l with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aHudk-000OrG-Uw for freebsd-questions@freebsd.org; Sat, 09 Jan 2016 15:37:12 +0100 Date: Sat, 9 Jan 2016 15:37:12 +0100 From: Bertram Scharpf To: freebsd-questions@freebsd.org Subject: Re: Printer question Message-ID: <20160109143712.GA94931@becker.bs.l> Mail-Followup-To: freebsd-questions@freebsd.org References: <5690FCED.7000401@bananmonarki.se> <20160109143456.74f48f42.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160109143456.74f48f42.freebsd@edvax.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: Bertram Scharpf X-Provags-ID: V03:K0:2O12OLj3zxflAzIQpiBQ4qxynqPjF3GcWAxdmgeeXqk2F3J96g3 1gc2jdKvzoONSAX9zMRv5dKSKcH2PaoshVllZj0CHiOPsYN3eZxJyYM3HWmdt7jNSUuGLJ9 GeXUIUxRRf9PN6Zzj3Hiv3BbWzQk252Qf53kBVjRAApBPLr/CW0/umt5gV1JQEovTMxXXpx lxjcDN+zlgc1OOvlO87Mw== X-UI-Out-Filterresults: notjunk:1;V01:K0:8RgiGmF9PAw=:Gf9jRb3Zx4swwxIFpiN+2Y MkA4j6sUdxifJKLZBpmgkoNjJPCEkNSiI/rF6LOscMgAvWXzSyU8KZM8E1zej1c/M3QUOLpIk akDdGfGjbDItC1c+i0HqRb20wCvSCQFPp2taQsmZ35S5WLbLQCW09pGdBzSpvyUwVg9z2ND+c 94L3TkbcLq8yduAoILeSwSNzRw9o0K9YfxnpgcpqEWDnLtdexAeWUJk/BQ2/R82H5Zn1HWdJw CRwFhOg3iwYlGyJ8hJk9k0oPeXT3L31iZrhuSnN8C4Iby2N4d/RbZXu3pSWaAK4qmc61td7L2 k8KBctn0apJ2TD9wS5vMkZuSZLIU7Fe9uP6qdtfvBCCeO0ANk473km/ahFRcnHdlymWSil3t8 Wuh0Lc4x2+m2ehB0ePxc5FDxwSMmXkmP0P2OvUhs6r+25DOWDJjB1VbI7vKFywemJv9HxPoY4 S5cz7DNFdJopZonUsGH9L9fJn50WQnylWH1C4CcA4GYtLRidnoJ0hK3HEdh4ODyI5CItpz8Ff YpWWA2P3JEQoa2SrJ0d7I1FvErw+JJ9AsoLq6YPw0sYLnBmZcnyom6XbQgit1I3iFznd0yuBN km4i1mm1Wa9wlfwyjA9XILFUCL4LuZZLhbTRKBFLpCZaWvD/DZEYDrMZLXwtqd4dDlrKCdre2 HjcVV5WMZX6DoSHUUQKCPJw+i1bfpX+LPpiAzMyo3RpGAR8inUmJ6lCex9Mdd5axK0Ks= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2016 14:37:23 -0000 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