Guardian Programmer's Guide

Table Of Contents
Communicating With Printers
Guardian Programmer’s Guide 421922-014
11 - 20
Using Page-Control Commands
Using Page-Control Commands
Page-control commands include a subset of escape sequences that allow you to
control characteristics such as the length of the page and the left and right margins.
This subsection presents some of the more commonly used commands. Again, for
complete details on all page-control commands, refer to the printer reference manual.
Setting the Page Length
Page length on printers supported by Tandem 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 and right 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 following example sets the text area as 10 columns from the left and right edges of
the logical page:
SBUFFER ':=' [%33,"&a10l10M"] -> @S^PTR;
CALL WRITEX(PRINTER^NUM,
SBUFFER,
@S^PTR '-' @SBUFFER);
IF <> THEN ...
Escape sequence to set page length:
esc&llinesP
Escape sequence to set the left margin:
esc&acolumn-numberL
Escape sequence to set the right margin:
esc&acolumn-numberM