T.R | Title | User | Personal Name | Date | Lines |
---|
2319.1 | No | IOSG::NEWLAND | Richard Newland, IOSG, REO2-G/L2 | Wed Feb 24 1993 17:47 | 6 |
| There is some code in the mail sub-system which looks at the content of
messages to see if the start with '!PS-Adobe'. This functionality is not
available as an ALL-IN-1 function.
Richard
|
2319.2 | History Lesson | SCOTTC::MARSHALL | Spitfire Drivers Do It Topless | Thu Feb 25 1993 12:58 | 16 |
| Strictly speaking, the test for a PostScript file should be whether the first
four characters of the file are "%!PS".
This comes from Unix-land, where the standard data-file formats (including
exectubales, object libraries, etc, I think) have a four-byte tag at the
beginning, signifying the file type. It thus became standard practice for
specific text-file formats to use their first four bytes for an identifying
tag as well.
The test shouldn't look for the "-Adobe" part of the text, as this is just the
maker's name, rather than the file type.
So, back to the question in .0, it would be pretty easy to use TEXT_FILE within
ALL-IN-1 to read the first record of a file and see if it is PostScript.
Scott
|
2319.3 | The code does this | IOSG::NEWLAND | Richard Newland, IOSG, REO2-G/L2 | Thu Feb 25 1993 13:41 | 5 |
| I've looked at the source code and the first non-blank line has to start
with "%!PS-Adobe-".
Richard
|
2319.4 | Actually its '%!' or '%!PS-Adobe' | IOSG::TALLETT | Gimmee an Alpha colour notebook... | Fri Feb 26 1993 09:52 | 22 |
|
For the engineering purists among us, the PostScript language
reference manual (the "red" book) page 265:
"The very first line of every PostScript program ... should be '%!'
... (The Unix operating system has a scheme whereby the first 16
bits of a files's contents are a 'magic number' ... '%!' serves
as a 16-bit magic number that identifies PostScript files.) ...
A PostScript file is taken to be minimally conforming to the file
structuring conventions [of PostScript] if ... the first 11
characters of the program are '%!PS-Adobe-'. A Program is taken
to be fully conforming to the current version of the file
structuring convention if the version identifier consists of
'PS-Adobe-1.0' "
When Caroline was implementing this check, we decided that it was
too risky to just check for '%!', and since virtually all PS files
are (at least) partially conforming, the check should be for
'%!PS-Adobe-'.
Regards,
Paul
|