Subject: The StyleWriter Lives! (was Re: enscript (nenscript))
To: Bill Studenmund <wrstuden@loki.stanford.edu>
From: Monroe Williams <monroe@teleport.com>
List: port-mac68k
Date: 02/08/1996 02:06:33
You don't want to know how many questions I started to type into
this email, then removed because I figured them out. :-)
After using some of the things Bill wrote in the message quoted
below (the last obstacle was figuring out how :ms=: in printcap
worked) and rewriting some of my code several times, I now have
a working StyleWriter I driver under NetBSD. (Well, at least
I can print man pages on it with "groff -man foo.1 |lpr -Pstylps",
and the file "escher.ps" from the gs262 distribution comes out OK.)
Once I've had a chance to clean up the code a bit and write some
documentation, I'll make this available for general consumption.
In the meantime, if you have a StyleWriter I and a NetBSD-mac68k
machine with ghostscript installed and want to alpha-test this thing,
drop me a line. If you have some other flavor of StyleWriter, you're
probably out of luck, but you might give it a try. (If anyone in the
area of Portland, OR, USA has a different StyleWriter they could part
with for a couple of days, it just might get support as well... ;)
At 9:19 PM 2/6/96, Bill Studenmund wrote:
>[Discussion of partial success w/ StyleWriter deleted]
>> - Is there an example of another gs driver that needs _two-way_
>> communication with the printer? (The serial protocols the
>> StyleWriter uses are STRANGE. No flow control is the least
>> of it.)
>
>I think that you should just be generating an output file in gs.
>Set the system up so you use indirect queuing; the gs output
>goes into another queue. Make the second queue use an input
>filter that understands the weird handshaking of the printer.
>This way, you can also dump a large file of text, or graphics
>from a different computer, to the printer w/o problem. So
>the gs driver would not add the handshaking-request commands;
>the filter would.
The setup you describe here works, but is rather disk-space
intensive. Since I want to image each page at printer
resolution (360dpi), the files that get put in the queue are
about 1.2 Meg per page. I was able to create a lpr input filter
from a shell script that pipes the output from gs to my driver
program, so that the pbm file never actually gets saved to disk.
I then set up /etc/printcap to use this filter so that PostScript
files get spooled properly. It all seems to work pretty well.
Also, since the low-level printer driver will ONLY grok pbmraw
files, and always prints them at 360 dpi, putting things in its
queue is probably less than useful. :-) (The reason I did this is
that (AFAICT) the StyleWriter has no built-in fonts or ascii text
capability at all. Pbmraw seemed like the easiest of ghostscript's
raster output file formats to write input routines for, so...)
-- monroe