ESC Commands: Difference between revisions
(→CR) |
(→CR) |
||
Line 368: | Line 368: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|}=== CR === | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 387: | Line 389: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|}=== CR === | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 406: | Line 410: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|}=== CR === | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 425: | Line 430: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|} | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 463: | Line 451: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|} | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 501: | Line 472: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|}=== CR === | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 520: | Line 492: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|} | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 558: | Line 513: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|} | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 596: | Line 534: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|}=== CR === | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 615: | Line 554: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|} | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 653: | Line 575: | ||
|- | |- | ||
| Reference|| ESC 2,ESC 3 | | Reference|| ESC 2,ESC 3 | ||
|} | |} | ||
=== CR === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- |
Revision as of 06:26, 18 April 2018
ESC Commands
HT
HT | |
---|---|
Name | Horizontal tab |
Format | ASCII HT
Hex 09 Decimal 9 |
Description | Move the print position to the next tab position.
|
Reference | ESC D |
LF
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII LF
Hex 0A Decimal 10 |
Description | Print the data in the printer buffer, then feed paper for one line
according to the current line space settings. After printing, the print position moves to the beginning of the line. |
Reference | ESC 2,ESC 3 |
CR
CR | |
---|---|
Name | Carriage return |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | LF |
ESC SP n
ESC SP n | |
---|---|
Name | Set the right-side character space |
Format | ASCII ESC SP n
Hex 1B 20 n Decimal 27 32 n |
Description | Set the right right-side character space is [n×0.125mm]
|
Default | n=0 |
ESC ! n(Ⅰ)
ESC ! n | |
---|---|
Name | set the font type |
Format | ASCII ESC ! n
Hex 1B 21 n Decimal 27 33 n |
Description | Set the font type (italic, border, bold, double width, double height,
inverse or underline). And the bit definitions of parameter n are shown as follows table |
Reference | ESC -, ESC E, GS ! |
Default | n=0 |
ESC ! n(Ⅱ)
Bit | On/off | Hex | Decimal | Function |
0 | off | 00 | 0 | Character type A (12×24) |
0 | on | 01 | 1 | Character type B (9×17) |
4 | off | 00 | 0 | Double-height mode off |
4 | on | 10 | 16 | Double-height mode on |
5 | off | 00 | 0 | Double-width mode off |
5 | on | 20 | 32 | Double-width mode on |
7 | off | 00 | 0 | Underline mode off |
7 | on | 80 | 128 | Underline mode on |
- If set double-width and double-height at the same time, quadrupled thecharacter size.
- Can not underline the blank generated by HT or the rotate 90 character.
- The width of under line set by ESC -, have not affected by the character size.
- ESC M also can set character type.
- ESC – also can turn on/off underline.
- GS ! also can set character size.
ESC $ nL nH
ESC $ nL nH | |
---|---|
Name | Set the absolute print position |
Format | ASCII ESC $ nL nH
Hex ESC $ nL nH Decimal 27 36 nL nH |
Parameter Range |
|
Description | Moves the print position to a location in a distance of (nL + nH × 256) dots from
the starting position for printing |
Reference | ESC \ |
ESC * m nL nH
ESC * m nL nH d1...dk | |
---|---|
Name | Select bit-image mode |
Format | ASCII ESC * m nL nH d1...dk
Hex 1B 2A m nL nH d1...dk Decimal 27 42 m nL nH d1...dk |
Parameter Range |
|
Description | Stores the bit image data in the print buffer using the mode specified
by bit image mode m, nl and nh specifies a bit image in the horizontal direction as(nl+256×nh) dots, [d]k specifies the bit image data (column format) k indicates the amount of bit image data, but it does not need to be transmitted.. |
Note |
|
ESC - n
ESC - n | |
---|---|
Name | Turn underline mode on/off |
Format | ASCII ESC - n
Hex 1B 2D n Decimal 27 45 n |
Description | Turns underline mode on or off using n as follows
|
Note |
Can not underline the blank generated by HT or the rotate 90 character. Default width is 1-dot thick. The thick is not affected by the character size. ESC ! can also turn on/off underline. |
Default | n=0 |
Reference | ESC ! |
ESC 2
ESC 2 | |
---|---|
Name | Set the line space to a default value 3mm |
Format | ASCII ESC 2
Hex 1B 32 Decimal 27 50 |
Description | Set the line space to a default value 3mm(24×0.125mm) |
Reference | ESC 3 |
ESC 3
ESC 3 | |
---|---|
Name | Set the line space to n dots |
Format | ASCII ESC 3 n
Hex 1B 33 n Decimal 27 51 n |
Description | ASet the line space to n dots |
Default | n=24 |
Reference | ESC 2 |
ESC SO
ESC SO | |
---|---|
Name | Turn on double width mode |
Format | ASCII ESC SO n
Hex 1B 0E n Decimal 27 14 n |
Parameter Range | 0≤n≤255 |
Description | Turn on double width mode |
Note | Use LF or ESC DC4 to turn off |
Default | n=2 |
ESC DC4
ESC DC4 | |
---|---|
Name | Turn off double width mode |
Format | ASCII ESC DC4 n
Hex 1B 14 n Decimal 27 20 n |
Parameter Range | 0≤n≤255 |
Description | Turn off double width mode |
Default | n=2 |
Note | The value of n is same with the n in turn on command |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |
CR
LF | |
---|---|
Name | Print and feed paper |
Format | ASCII CR
Hex 0D Decimal 13 |
Description | Adjust the print position to the starting position of this line and line
feed. |
Reference | ESC 2,ESC 3 |