(v13) Comment parsing example
This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.
The following example arranges to detect the %%CreationDate
: comment and print the associated date. (Where this "printing" appears depends on where PostScript-language standard output is directed: typically it is directed to the monitor window in GUI versions of the RIP, to the shell in command-line versions, and perhaps elsewhere in embedded or custom versions.)
The example works by adding an entry to the %%actions
dictionary in the %%dict
dictionary; see (v13) Adding a new comment processing procedure.
(%%dict) load (%%actions) get begin
/CreationDate: {
% stack contains remainder of comment; ignore
% leading spaces -there may or may not be a
% space after the colon
{
( ) anchorsearch { pop } { exit } ifelse
} loop
(JOB REPORTS CREATION ON ) print
print
(\n) print
} bind def end