Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 May 1997 10:16:48 -0700 (PDT)
From:      Annelise Anderson <andrsn@andrsn.stanford.edu>
To:        dlr <dlr@asylum.org>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Print question
Message-ID:  <Pine.BSI.3.94.970525100758.27271A-100000@andrsn.stanford.edu>
In-Reply-To: <19970525100212.01743@asylum.asylum.org>

next in thread | previous in thread | raw e-mail | index | archive | help


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 <filename> 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<esc>.

You can also put these strings directly into the document.
qp.awk above (and qp) and in ~/bin and are executable.

Annelise  

 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.94.970525100758.27271A-100000>