Skip to main content
Skip table of contents

StartRender procedures

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

StartRender is a RIP extension, a page device key whose value is a dictionary. As with InputAttributes, Policies, and so on, the contents of a StartRender dictionary in the operand of setpagedevice are merged with the StartRender dictionary already present in the page device.

The values in the StartRender dictionary are procedures. These procedures are all executed (in an arbitrary order) after EndPage has returned true (usually during showpage) but before any more of the rendering process has started.

The keys in the StartRender dictionary are only used to distinguish one entry from another; if a new key is supplied in the StartRender dictionary value to setpagedevice, it is added, but if the key already exists, the new value for that key replaces the old one.

Consider the following example, which counts the number of uses of the fill operator on each output page of a PostScript-language job:

  /StartRender <<
    /OEMReportFillCount { % arbitrary name
      (There were ) print
      //globaldict /FillCount get //=string cvs print
      ( fills on the page\n) print
      //globaldict /FillCount 0 put % restart for next page
    } bind
  /Install { % initialize count: concatenate Install procedures
    null exec //globaldict /FillCount 0 put
  } dup 0 currentpagedevice /Install get put bind
>> setpagedevice

  % shadow fill to increment count as well as filling
  /fill {
    fill //globaldict begin /FillCount FillCount 1 add def end
  } bind
>> 1183615869 internaldict /shadowop get exec

Use the StartRender procedures for these main purposes:

  • To prevent a page from being printed if something has been detected while interpreting the page that makes this advisable.

For example, the Harlequin RIP uses a StartRender procedure to provoke a PostScript-language error before rendering if a font is not present on the page (and this feature is turned on). It does this at StartRender rather than when a missing font is first detected so that all such fonts can be reported rather than just the first failure on the page. This avoids the problem where one new font is installed only to reveal that a further one is required next time the job is run.

Harlequin MultiRIP also uses a StartRender procedure to stop the job if a calibration set is not present for a screen and that screen is used; it is not possible to tell if the screen is used until rendering time.

  • To send parameters to %pagebuffer% or elsewhere that are not known until interpretation of a page is complete.
  • To adjust jobname in statusdict. The pagebuffer name is built from this name, so you affect the pagebuffer name but slightly indirectly. This allows the pagebuffer name to be more meaningful when viewed in the Output Controller of GUI versions or accessed from a program.

    If code is added to change the job name in StartRender, by setting jobname in statusdict, we recommend that you set /jobnameencoding in statusdict; the value should be a string that is one of the ICU encoding identifiers. See the Localization Kit manual for more information.

The Harlequin Core SDK cannot be localized.

StartRender is like taking some action in EndPage when it returns true, but the multiple procedures allow for a variety of independent tasks to be executed without each needing to know about the others. However, because names need to be distinct, we advise you to include your company name or OEM number in any procedure names so that they cannot accidentally replace any other StartRender procedures.

JavaScript errors detected

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

If this problem persists, please contact our support.