Skip to main content
Skip table of contents

(v13) The Setups directory

This page applies to Harlequin v13.1r0 and later; and to Harlequin MultiRIP but not Harlequin Core

Large amounts of PostScript language code are often required to set up an output plugin based on its plugin parameters. It is convenient to put this code in a separate file rather than to embed it in the C source for the plugin. This convention is now supported explicitly.

This PostScript language setup file is usually a file called Setup in the Setups directory within the plugin's folder. The plugin's PostScript language code need only contain the string:

(%fs%Setup) run

to run it (whether or not the file is actually called Setup ). Take care if you use sprintf or a similar for‐ matting function to fill this string, since it uses % as an escape character.

If there are several device types in the plugin, and there are minor variations from type to type, this is most easily handled dynamically from the Setup file. Give each device type a DICTSTRUCTION (with no corresponding Doobri ) all with the same key name. In the corresponding default values, provide a number or string which identifies the device type. Then Setup can conditionally execute according to device type:

TEXT
    currentpagedevice /MyOEMDEviceType get (My Type 1) eq {
      ... code for "My Type 1" ...
    } {
      ... code for "My Type 2" or whatever ...
    } ifelse

Or if there are many types:

TEXT
    <<
      (My Type 1) { ... } bind
      (My Type 2) { ... } bind
      ...
    >> currentpagedevice /MyOEMDEviceType get get exec

If the setup process differs significantly between device types, you could have several setup files, each named according to the name of the device type they set up and placed in the Setups directory. If there is a file called Setup in the Setups directory, that file is always used when (%fs%Setup) occurs in PostScript language code. If there is no Setup file, the device‐type‐specific file is used for (%fs%Setup) instead.

Within Core modules there is optionally an ExtraStart folder that contains an Init file which is the equivalent to the Setup file for output plugins.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.