Skip to main content
Skip table of contents

(v13) Other pagedevice hooks and history


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

Global Graphics Software added pagedevice hooks at various times. A full summary follows:

StartRender

A hook to be run as rendering is about to start. This is not the end of page, as detected by the EndPage hook. For example, when a page with no content is processed, there is no call to StartRender.

A StartRender hook can modify rendering if the change is done carefully. For example, it might substitute a new value for NumCopies.

See also (v13) StartRender procedures for more examples.

StartPartialRender

A hook to be run immediately before a partial paint

StartJob

A hook to be run immediately after the job starts. The precise timing is that this hook is run before the job is actually run, but after the file is opened and initialized as currentfile. It is called at the job’s save level.

You can use StartJob with setstdio to substitute another stream for the current job, and process the current job in some manner. Use StartJob to copy a job to disk, or substitute the contents of a job for an alternate file stream.

See also (v13) Using the job name from StartJob and EndJob hooks for hints on finding the job name from a StartJob or EndJob hook.

StartPainting

A hook to be run as the first painting operator is encountered

EndRender

A hook to be run just after queueing all separations for rendering

Outputting may abort for various reasons (memory or device problems, and so on), so this hook is not reliable as a way of telling if output has finished. Also, a call to EndRender (and StartRender) happens regardless of whether the user parameter NeverRender is true.

EndJob

A hook to be run as the job is about to end. It is called at the job’s save level. This hook is run even if the job fails for some reason, allowing its use for clean-up operations.

When the EndJob hook is called, a boolean value is at the top of the operand stack, with true indicating that the job terminated with an error.

The EndJob hook must leave the boolean on the stack but may examine its value to decide whether to perform any cleanup action.

See also (v13) Using the job name from StartJob and EndJob hooks for hints on finding the job name from a StartJob or EndJob hook.

StartImageA hook to be run at the start of images
EndImageA hook to be run at the end of images

With the exception of StartPainting, these hooks should not make graphic marks or cause pagedevice deactivation.

You cannot use gsave and grestore within a /StartImage /EndImage hook.



JavaScript errors detected

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

If this problem persists, please contact our support.