LaserWriter: How To Check For Laser Prep Dictionary


If you want to query the LaserWriter to see if the "Laser Prep" information
exists (if, for instance, you are using the LaserPrep dictionary) before
sending a PostScript file, use the following procedure.

The Laser Prep dictionary, when in the LaserWriter, is called "md". The
following PostScript command pushes the Boolean "false" onto the stack if
the dictionary is not found. If the dictionary is found, the dictionary
object and the Boolean "true" is pushed onto the stack:

/md where

The following command immediately returns a "1" if the Laser Prep dictionary
is present and a "0" if it is not:

/md where{/md get /av get cvi 68 eq{(1)}{(2)}ifelse}{(0)}ifelse = flush


Published Date: Feb 18, 2012