Medium Overlays and Page Overlays
An AFP overlay can be used as a page overlay or as a medium overlay. Different actions are performed on these two different types of overlays. Page overlays apply to the page and are placed relative to the page origin. Medium overlays always apply to the entire medium and are placed at the medium origin. When used with N_UP, the medium overlay still applies to the entire sheet of paper, not to the individual partitions.
The same overlay can be either a page overlay or a medium overlay, depending on the method used to invoke it for printing. An overlay invoked by a page definition or by an Include Page Overlay (IPO) structured field is always a page overlay. An overlay invoked by a form definition without N_UP is always a medium overlay. When N_UP is specified in the form definition, you can specify commands to invoke a page overlay. The examples below show the ways in which overlays can be invoked.
Page Overlay Invoked by an IPO Structured Field
PAGEDEF EXMPL1 ; PAGEFORMAT P2EXMPL1; OVERLAY EXMPL1; /* Allows this page overlay to be */ /* invoked by an IPO structured field */ PRINTLINE REPEAT 60; /* coded in the print data */
Page Overlay Invoked by a PRINTLINE Command
PAGEDEF EXMPL2 ; PAGEFORMAT P2EXMPL2; OVERLAY EXMPL2; /* Optional. Stores overlay for reuse */ PRINTLINE REPEAT 1 POSITION 1 IN 1 IN OVERLAY EXMPL2 /* Prints overlay if data prints on printline */ -1 IN -1 IN ; /* Positions overlay relative to printline */ PRINTLINE REPEAT 50;
Medium Overlay Invoked by a Form Definition
FORMDEF EXMPL3 ; COPYGROUP F2EXMPL3 DUPLEX NORMAL ; OVERLAY XMPL3F; /* Allows SUBGROUP to invoke overlay */ OVERLAY XMPL3B; /* Allows SUBGROUP to invoke overlay */ SUBGROUP FRONT OVERLAY XMPL3F; /* Prints overlay on front of every form */ SUBGROUP BACK OVERLAY XMPL3B; /* Prints overlay on back of every form */
Page Overlay in a Simple N_UP Form Definition
FORMDEF EXMPL4 ; COPYGROUP F2EXMPL4 N_UP 2 OVERLAY EXMPL4 /* Prints overlay with page in every */ 0 0 ; /* Partition at the page origin (0,0) */
Page Overlay in an Enhanced N_UP Form Definition
FORMDEF EXMPL5 ; COPYGROUP F2EXMPL5 N_UP 2 PLACE 1 OVERLAY XMPL51 /* Prints overlay in Partition 1 */ 0 0 PARTITION /* Places it relative to Partition */ PLACE 2 OVERLAY XMPL52 /* Prints overlay in Partition 2 */ 0 0 PARTITION ; /* Places it relative to Partition */