ESC/P Command Reference
- 51 -
5. Control Command Details
ESC (v
Specify relative vertical position
ASCII: ESC
(
v nL
nH
mL
mH
Decimal: 27
40
118
nL
nH
mL
mH
Hexadecimal: 1B
28
76
nL nH mL mH
Parameters
nL=2
nH=0
0
≤
mL
≤
255
0
≤
mH
≤
127
-16384
≤
(
mL+mH*256
)
≤
16383
Description
z
Specifies the vertical print position as a relative position from the current position.
Vertical position after movement=mL+mH*256+current position
z
When moving upwards, the specified value is expressed as a two's complement.
It is determined by the following equation.
mL+mH*256=65536–distance actually moved
z
Settings moving the print position above the top margin are ignored.
z
If a position extending beyond the bottom margin is specified, printing starts.
z
With left alignment, the print position for the next line becomes the end position of the current line.
(The horizontal position does not move to the left margin.)
With right alignment and center alignment, the horizontal position moves to the beginning of the line.
z
Auto-canceling double-width characters specified with SO or ESC SO are canceled.
Abcdefg
ABC
SDFASG
Abcdefg
ABC
SDFASG
Abcdefg
ABC
SDFASG
Example: Moving to a vertical position specified after the second line
Left alignment Center
alignment
Right alignment