ESC/ P Command Reference

Table Of Contents
ESC/P Command Reference
- 38 -
5. Control Command Details
ESC ! Global formatting
ASCII: ESC ! n
Hexadecimal: 1B 21 n
Parameters
0≤n≤255
Description
Specifies a combination of print modes.
Specifies modes depending on the bit value of n.
When the ESC ! code is used, a combination of multiple print modes can be specified at one time.
The priority order is from Bit 5 to Bit 2.
Bit 0 is available only if Bit 1 is 0.
Selected character styles are canceled, and the characters return to the normal style.
Canceling double-width characters also cancels compressed (half-width) characters.
Bit
7
6
5
4
3
2
1
0
1 Underline Italics
Double
width
Double
height
Bold Compressed Proportional 12 cpi
0
Cancel
Cancel
Cancel
Cancel
Cancel
Cancel
Cancel
10 cpi
Example
To apply underlining and specify double-width characters at the same time:
Code: ABC ESC ! A2h ABC ESC ! 00h ABC FF
Print result: ABC
ABC
A B C