Subject: Re: printcap, banners, and PostScript...
To: Brad Spencer <brad@anduin.eldar.org>
From: Don Lewis <gdonl@gv.ssi1.com>
List: current-users
Date: 01/20/1996 20:22:00
On Jan 20,  7:44pm, Brad Spencer wrote:
} Subject: Re: printcap, banners, and PostScript...
} Date: Sat, 20 Jan 1996 07:58:35 -0500
} From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
} To: current-users@NetBSD.ORG
} Subject: Re: printcap, banners, and PostScript...
} Sender: owner-current-users@NetBSD.ORG
} Precedence: list
} X-Loop: current-users@NetBSD.ORG
} 
} [snip]
} 
} >> If the first two characters are "%!", it's PostScript.
} >
} >> Hmm, this is fairly easy.  Just get a decent printer filter.  [...]
} >> PS files always start with !#PS, so you can recognize them quite easy.
} >
} >Once more: this is a reasonable guess, but only a guess; it is
} >perfectly valid for text files to start with %!, or PostScript programs
} >to not start with a comment.  (Requiring PostScript code to start with
} >a comment is as silly as cc refusing to compile something that doesn't
} >start with /*.)

It's a really good guess in my experience.  I don't think I've ever
seen a Postscript file without the %! or a non-Postscript file with
it (no contrived examples please).  In my experience, the spooler is
better off making this guess than relying on me to specify the file
type.  Chewing up a ream of paper printing a Postscript file in source
form doesn't make me very happy.  Now if there was a solution to users
printing executables and other strange binary files ...

} [snip]
} 
} I believe that I have run into duel mode laser printers which use '%!'
} [and perhaps other hints] to figure out to itself that the following
} would be Postscript as opposed to whatever other mode it also
} supported.  The place I was at was not in the habit of printing text
} with '%!' as the first two characters, so I am not sure I ever saw a
} mis-guess.  Point taken, however....

I've seen printers mis-guess, and it's really a pisser.  At least if
it's your print spooler doing the guessing, you can go in and hack
the source to fix its hieristics.  I don't know what that printer
thought about my /etc/printcap file, but it sure wouldn't print it.