7.6

Table Of Contents
l The translate statement in the runpage code positions the overlay on the print page. Remember that
the translate command sets a new point of origin so each iteration of the loop positions its copy of the
page relative to the point of origin of the last one.
l In the DOCPAGE code, the global variable &six advances the data selection with each iteration of the
outermost loop of the runpage code.
Print a line of text on odd-numbered pages
This sample prints a line of text only on odd-numbered pages. It uses the system integer variable &current.printpage, and
assumes you add a PlanetPress Talk object containing this code to every page in your document.
Code:
% =======================================================
% PRINT A LINE OF TEXT ON ODD-NUMBERED PAGES ONLY
% =======================================================
if(eq(mod(&current.printpage,2),1))
margin(1.5,9.75)
show('See reverse side of this page')
endif()
Notes:
l If you use a runpage, you would integrate this code into the runpage code.
Determine the proper page to print based on the width of the data in the data page
In this sample, the document contains three different pages and a runpage that manages execution of the three pages.
Each document page has a different page width and accommodates data of a specific line length. The code determines which
document page to use with a given data page based on the length of line 5 of the data page. The three page widths are 198 col-
umns, 132 columns, and 80 columns.
Code:
% =======================================================
% SELECT THE PROPER PAGE FOR THE CURRENT DATA
% =======================================================
if(trimleft(@(5,198,1))<>'')
execpage('198ColPage')
elseif()
if(trimleft(@(5,132,1))<>'')
execpage('132ColPage')
elseif()
execpage('80ColPage')
endif()
endif()
©2010 Objectif Lune Inc - 239 -