24 25
see ESC% and ESC: commands.
ESC %
Replace with User Defined Characters
Format
ASCII :
ESC % m1 n1 m2 n2 ... mk nk NUL
Decimal :
27
37 m1 n1 m2 n2 ... mk nk 0
Hexadecimal: 1B
25 m1 n1 m2 n2 ... mk nk 00
Explanation:
This command is used to replace font characters n with user-defined characters m.
m1, m2, ... mk are codes of user-defined characters.
n1, n2, ... nk are codes of the characters in the current font - the replaced characters.
The values m and n should be in the range 32 to 255. The subscript k ranges from 1
to 32. The maximum number of replaced characters is 32.
The NUL character is added to indicate the end of the commands. Also refer ESC &
ESC: commands.
ESC :
Reinstate the Font Characters
Format
ASCII :
ESC :
Decimal :
27
58
Hexadecimal:
1B
3A
Explanation:
The command reinstates the original characters in the font replaced by user-defined
characters using ESC % command. User-defined characters, however, are not
deleted from the RAM in printer and may be brought back again with ESC %.
3.5.2
User Defined Characters Form 2
Support user defined high density characters for 203 DPI horizontal and vertical.
Compatible with printer using ESC/POS commands.
.ESC %
Select User Defined Characters
Format
ASCII :
ESC % n
Decimal :
27
37 n
Hexadecimal:
1B
25
n
Explanation:
This command can select /cancel user-defined characters. n should be in the range 0
-1.
If n =<00000001> B the user-defined characters are selected.
If n=<00000000> B the regular characters are selected.
Default setting is regular characters. Using ESC & command to define
user-defined characters.
ESC &
Define User Defined Characters
Format
ASCII :
ESC & s n m [a [p] s x a ]m-n+1
Decimal : 27
38 s n m [a [p] s x a ]m-n+1
Hexadecimal: 1B
26 s n m [a [p] s x a ]m-n+1
Explanation:
This command allows characters to be defined. s = 3, 32< = n < m < = 126, 0 < = a
< = 12 (for font A), 0 < = a < = 9 (for font B), 0 < = p < = 255.
- s stands for number of bytes in vertical. S = 3.
- n stands for starting ASCII code of user-defined character.
- m stands for ending ASCII code of user-defined character.
When define only one character n=m. The maximum number of user-defined
characters is 50 and the maximum number of times for different
user-defined characters is 50 for each Font A & Font B.
- a stands for number of dots horizontal.
- p stands for data of user-defined characters, there are s x a character codes for each
character for defining m-n+1 characters.
- user-defined characters are valid till re-definition or return back to start position or
power off.
3.6
Graphics Printing Commands
3.6.1
Bit Image Graph Setting Form I
Only support bit map 101 DPI horizontal and 68 DPI vertical.
ESC K
Bit Image Graph Printing
Format
ASCII:
ESC K n1 n2 ... data
...
Decimal:
27
75
n1
n2
...
data ...
Hexadecimal:
1B
4B
n1
n2
...
data ...
Explanation:
This command is designed to print n1 x 8 bit image. The width of this bit map is n1
+ n2 x 256 dots and the height is 8 dots.
Each column has 8 dots and can be presented by a byte (8 bits and bit 7 presents the
highest dot in the column). The data are the bytes of relative columns in the graphics
sequential from left to right.. The number of bytes should be n1 + n2 x 256.
3.6.2
Bit Map Graph Setting Form II
ESC *
Set Bit Map
Format
ASCII :
ESC * m n1 n2 [d] k.
Decimal :
27
42 m n1 n2 [d] k
Hexadecimal: 1B
2A m n1 n2 [d] k
Explanation:
This command is for setting bit map by using m and n1,n2. The bit map graph can
be printed by either followed LF command or the width of the graph exceeds the
width of the line. So, this command allows to print both characters and graphics in
same line.
m = 0, 1, 32, 33. n1 = 0 - 255, n2 = 0 - 3, d = 0 - 255.
k = n1 + 256 x n2 (m = 0, 1)