Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!lll-winken!uunet!mcsun!ukc!icdoc!inmos!frogland!des From: des@frogland.inmos.co.uk (David Shepherd) Newsgroups: comp.lang.postscript Subject: Re: How can I tell if a file is "postscript" Message-ID: <13109@wraxall.inmos.co.uk> Date: 15 Mar 91 11:25:45 GMT References: <1448@vidiot.UUCP> <449@heaven.woodside.ca.us> <1460@vidiot.UUCP> <1991Mar13.160331.25024@maths.nott.ac.uk> Sender: news@inmos.co.uk Reply-To: des@frogland.inmos.co.uk (David Shepherd) Organization: INMOS architecture group Lines: 45 In article <1991Mar13.160331.25024@maths.nott.ac.uk>, anw@maths.nott.ac.uk (Dr A. N. Walker) writes: > Just so. Now think how many things break if "lpr B" lists B > if the printer is a simple lineprinter but produces a fancy graphic > if we upgrade it to a LaserWriter. > > What's more, there is a similar potential problem with every > different printer language. We could find ourselves with 10 different > printers on our network, each with a different [or, worse, the same] > magic marker, so that all sorts of files must be "enscripted" by one > of 10 different programs to print on some printers, and must not be > to print on all the others. 1) if two different printer languages use the same "magic marker" then at least of of the language designers is being pretty dumb and then you're probably stuck. Answer: assume language designers have some intelligence and won't do anything as crass as this. Perhaps you could also assume that one of them will claim infringement on look and feel of their magic marker and let their lawyers sort it out. 2) assuming all printer languages have differnt magic markers your printer filter just needs to identify the files that that printer can print and process it appropiately. If if it can't then either return an error message or mail a message back. If a printer can't handle a file then, probably it was a mistake to send it there! On the system i adminstrate I wrote a filter that can handle PostScript, TeX DVI, troff C/A/T or ASCII text (printable chars only in file). Another system adminstrator here didn't like the restriction on printable chars only is ASCII files so removed it. The result is that occasionally you see his printer struggling to print a binary file! Perhaps we should be seeing lpr in a more object orientated manner. Rather than copying the file to the printer it should be seen as the print action taken from the class of the given file. If you object to files starting with %! being treated different from others that don't, what is your view on executable files that start with #! /bin/sh ????? -- -------------------------------------------------------------------------- david shepherd: des@inmos.co.uk or des@inmos.com tel: 0454-616616 x 529 inmos ltd, 1000 aztec west, almondsbury, bristol, bs12 4sq Leland says, you're going back to Missoula ... MONTANA