Guardian Programmer's Guide

Table Of Contents
Communicating With Printers
Guardian Programmer’s Guide 421922-014
11 - 15
Using Page-Control Commands
Setting the Logical Page Length
The logical page length on Tandem laser printers is controlled by issuing an escape
sequence with the following format:
lines gives the maximum number of lines that each subsequent page can have. This
is the size of the logical page. The logical page sets the bounds for future operations.
The following example sets the page size to 48 lines:
SBUFFER ':=' [%33,"&l48P"] -> @S^PTR;
CALL WRITEX(PRINTER^NUM,
SBUFFER,
@S^PTR '-' @SBUFFER);
IF <> THEN ...
Setting the Margins
To set the left, right, and top margins, you use the following escape sequences:
The left and right margins are set according to the number of columns from the left or
right edge, respectively, of the logical page. The top margin is set to the number of
lines from the top of the logical page.
The following example sets the text area as 10 columns from the left and right edges of
the logical page and five lines from the top of the logical page:
SBUFFER ':=' [%33,"&a10l10M", %33, "&l5E"] -> @S^PTR;
CALL WRITEX(PRINTER^NUM,
SBUFFER,
@S^PTR '-' @SBUFFER);
IF <> THEN ...
Escape sequence to set page size:
esc&llinesP
Escape sequence to set the left margin:
esc&acolumn-numberL
Escape sequence to set the right margin:
esc&acolumn-numberM
Escape sequence to set the top margin:
esc&lline-numberE