ESC/ P Command Reference

Table Of Contents
ESC/P Command Reference
- 37 -
5. Control Command Details
ESC Apply/cancel underlining
ASCII: ESC - n
Hexadecimal: 1B 2D n
Parameters
n=0, 1, 2, 3, 4 or 48 (“0”), 49 (“1”), 50 (“2”), 51 (“3”), 52 (“4”)
Description
Applies or cancels underlining.
n=4 or 52 (“4”): Applies underlining with a width of 4 dots.
n=3 or 51 (“3”): Applies underlining with a width of 3 dots.
n=2 or 50 (“2”): Applies underlining with a width of 2 dots.
n=1 or 49 (“1”): Applies underlining with a width of 1 dot.
n=0 or 48 (“0”): Cancels underlining.
This command is valid anywhere in a text line.
The underlining specified with this command is a continuous line.
Spaces between characters and words are also underlined.
Areas with the specify absolute horizontal position (ESC $) and specify relative horizontal position
(ESC \) commands are not underlined.
4 dots is added to the line feed amount for lines that include underlined characters.
The underline is positioned as follows:
Underline
Underline Position
1 dot wide
2 dots below the characters
2 dots wide
Between 2 dots and 3 dots below the characters
3 dots wide
Between 1 dot and 3 dots below the characters
4 dots wide
Between 1 dot and 4 dots below the characters
ABCDE ABCDE ABCDE
(1-dot width) (3-dot width)
Example
Code: ABC ESC - 1 ABC ESC - 0 ABC FF
Print result: ABCABCABC