Specifications
1-28 Command Descriptions Rev. A
ESC W xL xH yL yH dxL dxH dyL dyH
[Name] Set printing area in page mode
[Format] ASCII ESC W
xL xH yL yH dxL dxH dyL dyH
Hex 1B 57 xL xH yL yH dxL dxH dyL dyH
Decimal 27 87 xL xH yL yH dxL dxH dyL dyH
[Range] 0 ≤ xL, xH, yL, yH, dxL, dxH, dyL, dyH ≤ 255
(except for
dxL = dxH = 0 or dyL= dyH = 0)
ESC W
xL xH yL yH dxL dxH dyL dyH sets the size and position of the printing area in page mode
as follows:
Horizontal starting position = [(
xL + xH × 256) × (horizontal motion unit)] inches
Vertical starting position = [(
yL + yH × 256) × (vertical motion unit)] inches
Printing area width = [(
dxL + dxH × 256) × (horizontal motion unit)] inches
Printing area height = [(
dy + dyH × 256) × (vertical motion unit)] inches
The default settings are as follows:
xL = xH = yL = yH = 0
dxL = 144, dxH = 1, dyL = 128, dyH = 5
This command is enabled only in page mode. If this command is entered in standard mode, an
internal flag is activated and the command is enabled when the printer selects page mode.
The horizontal and vertical motion units use the horizontal and vertical values set by the GS P
command. The default settings of the horizontal and vertical motion units are 1/160 and 1/144
inches, respectively.
Program Example Print Sample
PRINT #1, CHR$(&H1D);"P";CHR$(160);CHR$(144);
PRINT #1, CHR$(&H1B);"L";← Select page mode
PRINT #1, CHR$(&H1B);"W";CHR$(0);CHR$(0);CHR$(0);CHR$(0);CHR$(100);
CHR$(0);CHR$(4);CHR$(1);
PRINT #1, CHR$(&H1B);"T";CHR$(0);
PRINT #1, "AAAAA"; CHR$(&HA);← Store chara cters for printing
PRINT #1, "BBBBB"; CHR$(&HA);← Store chara cters for printing
PRINT #1, CHR$(&H1B);"T";CHR$(2);
PRINT #1, "CCCCC"; CHR$(&HA);← Store chara cters for printing
PRINT #1, "DDDDD"; CHR$(&HC);← Batch print
AAAAA
BBBBB
CCCCC
DDDDD
Printing
by ESC W
area set
←