Margins, Left and Right

Margins, Left and Right

ASCII Code ESC [p1;p2 s

Hex Code 1B 5B p1 3B p2 73

Dec Code 27 91 p1 59 p2 115

Expression CHR$(27);“[p1;p2s”;

Purpose The p parameters are distances from the left edge of the printable area of the paper in decipoints. They are internally converted to column positions based on the current CPI setting. The first print area will be one column to the right of the left margin.

NOTE: The margins set with this sequence begin at the first physical print position, not at the edge of the paper.

Discussion When operating at 10 CPI, the escape sequence ESC [720;8784s will produce a one-inch (10 column) left margin with column 11 as the first printable position. The print line length is 8784 decipoints minus 720, or 8064 decipoints (11.2 inches, 112 columns). If the normal print area of 13.2 inches is available, the right margin is one inch. The last column represented by p2 is the last print position and the right margin begins in the next column.

Left and right margin default values are column zero and the highest column number in use depending on the CPI setting, shown below. This escape sequence is valid in graphics but does not apply to bar codes. Default margins may be set by using ESC [s.

Left Margin = column 0 minus Right Margin 10 CPI = column 136

12 CPI = column 163

13.3CPI = column 181 15 CPI = column 204

16.7CPI = column 226

When printing in proportional mode or line mixing, the margins are converted to absolute positions for that line. If the printer receives this command anywhere in a printable line, the command will affect that line and subsequent printable lines.

37

Page 37
Image 37
Printronix ANSI Printer manual Margins, Left and Right, Ascii Code ESC p1p2 s