Subject: Re: Problem with CR/LF Printing Text to HP LaserJet--Progres
To: None <skidmore@macconnection.net, netbsd-users@netbsd.org>
From: Richard Rauch <rkr@olib.org>
List: netbsd-users
Date: 10/21/2003 18:33:40
Re. http://mail-index.netbsd.org/netbsd-users/2003/10/21/0011.html
Your script's problem is that it prints ONE escape code and then
exits. I think that the effect is going to be not what you intended.
(It is possible that lpd is sending the rest of the printer data to
/dev/lp by default when the filter exits early...otherwise, I think
that it will just have to discard the data to be printed or hold it
in a queue.)
I ran across this same problem a while back. It looks like I solved it
to a certain extent and then got pulled away. I remember deciding that
I had all of the pieces, but it doesn't look like I ever got "line-
printing" to work. (I mostly print via PostScript through GhostScript,
over a network, and into my trusty laser printer.)
I don't think that you need MagicFilter for this. A filter script that
looks like this should be enough:
/~~~ filter
#!/bin/sh
awk '{print $0 "\r"}'
\___ filter
On my machine that directly attaches to the printer, this is what I do,
and it is sufficient.
I prefer to use a set of lpd/lpr layers with multiple printcap entries
rather than relying on some "magic" program to sit quietly in the data
stream and guess what what I want.
If I want "magic" to happen, I use "a2ps" to generate PostScript and
then have GhostScript render that down to my printer.
--
"I probably don't know what I'm talking about." http://www.olib.org/~rkr/