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