ESC/P Command Reference
- i -
Introduction
Contents
Introduction ·········································································································· 1
What is ESC/P? ···································································································· 2
1. Using ESC/P Commands················································································· 3
2. Examples of Using ESC/P Commands ·························································· 5
3. ESC/P Command Limitations········································································ 11
3.1 Print area
.............................................................................................................
11
3.2 Characters
...........................................................................................................
13
3.2.1 Character sizes
.........................................................................................
13
3.2.2 Character pitches
.....................................................................................
14
3.3 Print position
........................................................................................................
15
3.3.1 Characters
................................................................................................
15
3.3.2 Bitmaps, barcodes and downloaded images
............................................
15
3.4 Line feed amount
.................................................................................................
16
4. Control Code List ··························································································· 17
5. Control Command Details ·············································································21
5.1 Character/style selection commands
...................................................................
21
ESC R
Select international character set
..................................................
21
ESC q
Select character style
....................................................................
22
ESC k
Select font
......................................................................................
23
ESC t
Select character code set
..............................................................
24
5.2 Text printing commands
.......................................................................................
25
ESC 4
Apply italic style
.............................................................................
25
ESC 5
Cancel italic style
...........................................................................
25
ESC E
Apply bold style
.............................................................................
26
ESC F
Cancel bold style
...........................................................................
26
ESC G
Apply double-strike printing
...........................................................
27
ESC H
Cancel double-strike printing
.........................................................
27
ESC P
Apply pica pitch (10 cpi)
.................................................................
28
ESC M
Apply elite pitch (12 cpi)
.................................................................
29
ESC g
Apply micron pitch (15 cpi)
............................................................
30
ESC p
Specify proportional characters
.....................................................
31
ESC W
Specify double-width characters
....................................................
31
SO
Specify auto-canceling stretched characters
.................................
32
ESC SO
Specify auto-canceling stretched characters
.................................
32
SI
Specify compressed characters
.....................................................
33
ESC SI
Specify compressed characters
.....................................................
33
DC2
Cancel compressed characters
.....................................................
34
DC 4
Cancel auto-canceling double-width characters
............................
34
ESC –
Apply/cancel underlining
................................................................
35
ESC !
Global formatting
...........................................................................
36
ESC SP
Specify character spacing
..............................................................
37
ESC X
Specify character size
....................................................................
38
5.3 Line feed commands
...........................................................................................
39
ESC 0
Specify line feed of 1/8 inch
...........................................................
39
ESC 2
Specify line feed of 1/6 inch
...........................................................
39
ESC 3
Specify minimum line feed
.............................................................
40
ESC A
Specify line feed of n/60 inch
.........................................................
40
5.4 Horizontal movement commands
........................................................................
41
ESC l
Specify left margin
.........................................................................
41
ESC Q
Specify right margin
.......................................................................
43