Detect Postscript Level of EPS

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
alexm
Posts: 17
Joined: 2015-03-19T10:15:14-07:00
Authentication code: 6789

Detect Postscript Level of EPS

Post by alexm »

How can I detect the postscript level of an EPS file?
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: Detect Postscript Level of EPS

Post by pipitas »

There is no easy, straightforward, reliable way to detect the PostScript level of an EPS (or of any other PostScript file).

Some PS files may provide it as a DSC comment like '%%LanguageLevel: 2' (which may be supplemented by '%%Extensions:'. But you cannot trust this, it may be wrong.

More reliable would be to check the complete code of the file for PostScript language operators (keywords) which were defined only for PS Level 2 or for PostScript 3.

To check for details about this, see...
  1. ...Chapter 1.3. "1.3 LanguageLevel 3 Overview" of the PLRM, and
  2. ...APPENDIX A: "LanguageLevel Feature Summary" of the PLRM
The PostScript Language Reference & Manual (PLRM) is available here: https://www.adobe.com/products/postscript/pdfs/PLRM.pdf.
Post Reply