From owner-freebsd-questions Wed May 21 15:08:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA10399 for questions-outgoing; Wed, 21 May 1997 15:08:23 -0700 (PDT) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA10371 for ; Wed, 21 May 1997 15:08:16 -0700 (PDT) Received: from andrsn.stanford.edu (root@andrsn.Stanford.EDU [36.33.0.163]) by agora.rdrop.com (8.8.5/8.8.5) with ESMTP id PAA10648 for ; Wed, 21 May 1997 15:00:58 -0700 (PDT) Received: from localhost (andrsn@localhost.Stanford.EDU [127.0.0.1]) by andrsn.stanford.edu (8.8.5/8.6.12) with SMTP id PAA15955; Wed, 21 May 1997 15:00:41 -0700 (PDT) Date: Wed, 21 May 1997 15:00:40 -0700 (PDT) From: Annelise Anderson To: Patrick Gardella cc: Dan Busarow , freebsd-questions@freebsd.org Subject: Re: Juki Printer? In-Reply-To: <199705212109.OAA20866@geocities.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Wed, 21 May 1997, Patrick Gardella wrote: > > On Tue, 20 May 1997, Patrick Gardella wrote: > > > However, I get the infamous staircase effect. Since I don't have the > > > manual, I don't have the escape character or the dip switch config to > > > change the LF to a LF/CR. > > > > Look in the handbook section on printing. There is a filter > > described there that will add the \r for you. > > There is a filter for HP printers (printf "\033&k2G") and one for > serial line printers, but not for parallel line or a Juki. > > The printf noted above does not work. > > Any other thoughts? > > Patrick To print to an HP laserjet, I use the following awk script, qp.awk: BEGIN { print("E&k3G(s1p10v0s0b5T&a06L") # times roman med #printf("E&k3G(s0p12v0s0b3T&a06L") # courier 12 point #printf("E&k3G(s1p14v0s3b4T&a06L") # helvetica } {print} END { printf("E") } which gets called from a shell script named qp: #!/bin/sh awk -f ~/bin/qp.awk $1 | lpr so I just type "qp filename" to print filename. This requires no filters. But the printer codes are PCL codes, probably not what the Juki uses. To find out what it uses you might try the newsgroup comp.perhipherals.printers (or something like that). The printer codes in qp.awk reset the printer, tell it to treat cr and lf as cr + lf, select a typeface, and set the left margin; others could of course be included, e.g., the code for printing in landscape instead of the default portrait, or the code for lines per inch. Try to get a manual for your printer! Annelise P.S. What looks like ^[ in the above is decimal 027, equivalent to \033 (octal) in the printer section of the FreeBSD handbook. In vi this is entered (in insert mode) with Ctrl-v, where is the escape key. (The "printf"s in the above probably could be only "print".)