Subject: Re: printcap, banners, and PostScript...
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 01/19/1996 10:38:56
>>> 1. Make a printer filter text into postscript, but leave postscript
>>>    alone.
>> This is not possible without resorting to human help; PostScript
>> _is_ text [...].
> I think that PostScript files must begin with %!PS-, otherwise they
> are treated as text.

This is a problem in both directions, then; it both renders a large
class of perfectly good text files (those that begin with the magic
sequence) unprintable and places unnecessary requirements on PostScript
code (requiring a comment for the code to be taken as PostScript is as
silly as a cc that refuses to compile something unless it begins with

It may be a reasonable heuristic in the absence of human guidance; the
major problem is that as far as I can see there is no way to get lpr to
pass any human guidance on, to tell the filter "this is text" or "this
is PostScript".  As I mentioned,

>> Indeed, I have on occasion wanted to print _exactly the same file_
>> twice, once as text and once interpreted as a PostScript program.

No automated guess can possibly get this case right.  Implement any
heuristic you please, but it's essential to let the human override the
guess in either direction.  (SunOS lpr - at least the release in use at
the lab I work for - is a good example of how not to do it; it provides
no way to override its guess, thus rendering a huge class of perfectly
good text files unprintable and a huge class of perfectly good
PostScript programs unrunnable.  Even worse, it doesn't document how it
makes its guess, and of course no source is provided so I can't check.
I've had to resort to experimenting to find a magic incantation to get
PostScript code to work, and then converting everything else to PS by
hand and muttering that incantation to print it.)

					der Mouse