From owner-freebsd-questions Sun May 25 10:16:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA29253 for questions-outgoing; Sun, 25 May 1997 10:16:55 -0700 (PDT) Received: from andrsn.stanford.edu (root@andrsn.Stanford.EDU [36.33.0.163]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA29248 for ; Sun, 25 May 1997 10:16:53 -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 KAA27291; Sun, 25 May 1997 10:16:48 -0700 (PDT) Date: Sun, 25 May 1997 10:16:48 -0700 (PDT) From: Annelise Anderson To: dlr cc: freebsd-questions@FreeBSD.ORG Subject: Re: Print question In-Reply-To: <19970525100212.01743@asylum.asylum.org> 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 Sun, 25 May 1997, dlr wrote: > I'm running freebsd 2.1 on a 486-66 and using a Star LS-5 with HP laserjet > 2P emulation. I've read the freebsd handbook on printing and have tried > multiple filters. Here is the problem: > > I have gotten ghostscript to work, and the first 2 or so pages come out > ok, then i will get one line overwritten which is garbage, then more > normal printing, then another line of overwritten garbage. The filters > seems to work ok, and i'm beginning to wonder if this is a problem with > the printer itself...i.e. the character set or something. > > I've had the same thing happen printing out ascii stuff also (long > email files). > > If anyone has a clue about this i'd be interested. I've been thru about 2 > reams of paper trying to figure this out and am just about ready to bail > and buy a postscript printer. > > I posted to a ghostscript email list and didn't get one response, so i > thought i'd try here, even though i know this probably isn't a freebsd > problem. > > dave racette I think you need not only ghostscript but apsfilter as well (that's a port). However there's an alternative that I use, an awk script as follows: BEGIN { print("E&k3G(s0p12v0s0b3T&a06L") # courier 12 point } {print} END { print("E") } I call this (it's named qp.awk) from a shell script, qp, that looks like this: #!/bin/sh awk -f ~/bin/qp.awk $1 | lpr so I just type qp to print. qp.awk resets the printer, tells the printer to reinterpret unix line endings, selects a typeface, and sets a left margin. At the end, it resets the printer. The ^[ in the above are decimal 027's created, in vi, with Ctrl-v. You can also put these strings directly into the document. qp.awk above (and qp) and in ~/bin and are executable. Annelise