4 – 1
4
ESC/P2 Command Summary
This chapter contains information detailing commands and features capable of being
generated using ESC/P2 commands. This emulation allows the user to generate
scalable fonts on 24-pin dot matrix printers.
Set character printing mode 27 40 94 1B 28 5E ESC ( ^ E2
Ln Hn (Data) Ln Hn (Data) Ln Hn (Data)
All Character Mode Decimal Hex ASCII Comp
Ln and Hn: Length of the following data calculated by Ln + Hn x 256
(MSB of Hn is ignored.)
Set print position unit 27 40 85 1B 28 55 ESC ( U E2
Ln Hn Pn Ln Hn Pn Ln Hn Pn
Print Position Unit Decimal Hex ASCII Comp
Ln and Hn: Length of the following Pn calculated by Ln + Hn x 256
(MSB of Hn is ignored.)
Normally Ln =1, Hn = 0, Pn = 10, 20, 30, 40, 50 or 60.
This sets the unit of the vertical and horizontal print positions as follows:
0 - Pn - 9 not changed
10 - Pn - 19
1
/360 inch
20 - Pn - 29
1
/180 inch
30 - Pn - 39
1
/120 inch
40 - Pn - 49
1
/90 inch
50 - Pn - 59
1
/72 inch
60 - Pn - 69
1
/60 inch
70 - Pn -127 not changed
Pn (0-255) Unit
Set Page Length 27 40 67 1B 28 43 ESC ( C E2
Ln Hn Lp Hp Ln Hn Lp Hp Ln Hn Lp Hp
Page Length Decimal Hex ASCII Comp
Ln and Hn: Length of the following parameters calculated by
Ln + Hn x 256.
(MSB of Hn is ignored.)
Normally Ln = 2, Hn = 0.
This sets the page length as follows:
Page length=(Lp + Hp x 256) a the current unit (inches) defined by ESC ( U.