Subject: Re: Various ramblings...
To: Valtteri Vuorikoski <vuori@sci.fi>
From: Monroe Williams <monroe@teleport.com>
List: macbsd-general
Date: 08/23/1995 09:51:09
>Ken Nakata has randomly hit several keys, resulting in
>> in its ROM, but Apple SW has no fonts if I'm not mistaken.  Everyting
>> is sent to the printer as bitmap.  DW is more of an ordinary serial
>
> Which might mean that you get to write your own QuickDraw (-:

... which is why I'm using ghostscript to do rasterizing.  Ghostscipt
printer drivers get a raster image as input.

Actually, after looking at the way the ghostscript drivers work, I think
I'll end up writing an lpr filter to actually control the printer. "Why,"
you may ask? Because ghostscript drivers must be able to spool to a file,
while lpr filters can request a read/write connection and actually interact
with the printer (which I have to do to make the stylewriter work).

If I haven't made any grave mistakes figuring this out, here's how it will 
work:
- invoke ghostscript with the correct DPI and page size for the Stylewriter,
    but tell it to generate output in pbmraw format
- pipe the output of ghostscript to 'lpr -v -P<something>' (-v tells lpr
    that the image is in 'raster' format, which really just means that
    it uses the 'raster' filter specified in the printer's printcap entry)
- have the printer configured to use the stylewriter control program 
    (which takes pbmraw files as input) as its 'raster' filter

The pbmraw files would be large (360 DPI, 8"x10.5" or so), but I should
be able to use pipes for the whole process so that only the PostScript file
gets written to disk.

I think you could set up another entry in /etc/printcap (sort of a virtual
printer) that would take care of this whole mess automatically, and even
call something like 'enscript' to do the right thing with straight text
files. 

What do y'all think? Does this look like a good idea or a vicious hack?
I've never dealt with unix printing at a low level before, so I'm making
this up as I go along. Suggestions are more than welcome. 

-- monroe