Skip to main content
Skip table of contents

Adding an annotation

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

An annotation might be added to ordinary pages or imposed output pages.

In the first case, this is simply a matter of doing the drawing required, most often in the EndPage procedure set up in a call to setpagedevice (because of the PostScript language’s opaque painting model, the job itself usually obliterates some or all of the graphics done in a BeginPage). A BeginPage procedure is called at the start of each page, and EndPage just before the page is output.

The following example puts the word "DRAFT” in outline across each page before it prints it, working out the angle to print at and so on from the page size.

/SW-Font /Times-Roman def
  /EndPage { % showpagecount code
    exch pop
    2 ne dup { % not on deactivation
        //SW-Font 100 selectfont
        currentpagedevice /PageSize get aload pop
        0 0 moveto (DRAFT) true charpath flattenpath pathbbox
        3 -1 roll sub
        3 1 roll exch sub
        exch 4 2 roll
        2 copy exch 2 div exch 2 div translate

        2 copy 2 copy lt { exch } if pop
        4 index div
        0.7 mul dup scale

        exch atan rotate

        exch neg 2 div exch neg 2 div translate

        0 setgray
        0 0 moveto (DRAFT) false charpath stroke
    } if
  } bind
>> setpagedevice

When imposition takes place, the interaction between the imposition and the annotation must be considered. For example, if you want “DRAFT” as above, should it print once per input page or once per output page?

Also, it may be appropriate to do some graphics in BeginPage when imposing pages. For example, you might want labels of various kinds outside the area of any of the job’s pages. This is especially true of pre-separated color jobs (color jobs automatically separated by the Harlequin RIP are quite different, and this is the subject of Color separation). To the Harlequin RIP, pre-separated jobs appear just like any other set of pages, except that it is now possible to determine the color of the separation; see Using DCS with pre-separated pages. Graphics in BeginPage may be used to add crop marks, color bars, registration marks and so on, either once per layout or once per input page as required. The calculations to position these, especially if you are automatically packing the output media, can be quite complex, but are not otherwise unusual, so [RB3] provides the necessary information. Clearly graphics to lie outside the input page area must be inserted before the clipping to that area.

JavaScript errors detected

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

If this problem persists, please contact our support.