Article View: comp.lang.postscript
Article #4951Re: How can I tell if a file is "postscript"
From: Laura Halliday
Date: Fri, 08 Mar 1991 15:37
Date: Fri, 08 Mar 1991 15:37
23 lines
1523 bytes
1523 bytes
With all the discussion of %! and friends, the original question, i.e. can you look at a file and tell if it's PostScript or not, appears to have gotten lost in the shuffle. Document Structuring comments notwithstanding, the problem is that PostScript is a language that was designed to be interpreted, and thus has rich operators and simplistic syntax. It's a lot easier to look for syntax than for vocabulary. Hence the problem. I went through this issue in another forum where somebody wanted to make a system that you could mail files to, and it would decide how to print them. The decision was to look for %!, and if it was there, print as PostScript. If not, make a few tests (e.g. look for parentheses) and if these tests were inconclusive, try printing as PostScript anyway to avoid producing reams of paper covered with gibberish if you guessed wrong. Oh yes - and fire the next person who writes an application that generates PostScript output that doesn't conform to the Document Structuring Conventions. ...laura
Technical Details
Message-ID:
<2873@van-bc.wimsey.bc.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!van-bc!hallidayReferences:
<1448@vidiot.UUCP> <487@appserv.Eng.Sun.COM> <1461@vidiot.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!van-bc!halliday From: halliday@van-bc.wimsey.bc.ca (Laura Halliday) Newsgroups: comp.lang.postscript Subject: Re: How can I tell if a file is "postscript" Summary: An interpreted language. Therefore... Message-ID: <2873@van-bc.wimsey.bc.ca> Date: 8 Mar 91 15:37:17 GMT References: <1448@vidiot.UUCP> <487@appserv.Eng.Sun.COM> <1461@vidiot.UUCP> Organization: The Lambda Continuum Lines: 23