RD-KT247 thermal printers
39 / 61
Program code is as follows:
unsigned char str[100];
j=0;
str [j++] = 0x1B;
str r[j++] = 0x2A;
str [j++] = 0; //m=0 (height is 8 dots, t
wice as width)
str [j++] = 8; //the width of the graphic is 8dots
str [j++] = 0;//the bit image data
str [j++] = 0x00;str [j++] = 0x80;str [j++] = 0xFF;str [j++] = 0x90;str [j++] = 0x98;
str [j++] = 0x96;str [j++] = 0x61;str [j++] = 0x00;str [j++] = 0x0D;//print the graphic
SendDataToPrinter(str,j);
[Example 2]
m =1 (8 dots, single
-width), d1 represents the data to be printed in the first column. And
dk represents the data to be printed in the k
th
column. The bn represents the n
th
bit of the byte.
d1 d2 d3 d4 d5 d6 d7 d8
0
1
1
1
1
1
0
0
b7
0
0
1
0
0
0
1
0
b6
0
0
1
0
0
0
1
0
b5
0
0
1
1
1
1
0
0
b4
0
0
1
0
1
0
0
0
b3
0
0
1
0
0
1
0
0
b2
0
0
1
0
0
1
0
0
b1
0
0
1
0
0
0
1
0
b0
d1
d2
d3
d4
d5
d6
d7
d8