我必須使用熱敏打印機打印發票收據。 我用Zjiang Thermal printer打印收據。 他們還提供manual &演示項目。 在演示項目中,他們使用librts「btsdk.jar」來實現連接&打印。如何使用藍牙熱敏打印機打印發票收據
我已成功建立打印機& android設備之間的連接。 但是沒有關於文本對齊(中心,左,右)&單元寬度,高度的指南。
I have try it。它只通過改變格式2變量來改變文本高度。
如何通過藍牙打印機打印發票。
也請說明本條
byte[] cmd = new byte[3];
cmd[0] = 0x1b;
cmd[1] = 0x21;
cmd[2] |= 0x10;
CMD 2 - 用於更改字體高度 有什麼用CMD [0] & CMD 1
代碼發送印刷消息到藍牙打印機演示項目
String msg = "";
byte[] cmd = new byte[3];
cmd[0] = 0x1b;
cmd[1] = 0x21;
cmd[2] |= 0x10;
mService.write(cmd);
mService.sendMessage("Congratulations!\n", "GBK");
cmd[2] &= 0xEF;
mService.write(cmd);
msg = " You have sucessfully created communications between your device and our bluetooth printer.\n\n"
+" the company is a high-tech enterprise which specializes" +
" in R&D,manufacturing,marketing of thermal printers and barcode scanners.\n\n";
mService.sendMessage(msg,"GBK");
打印信息 -
parameters:support to download the Logo trademark
FontA:12*24 dots,1.5(W)*3.0(H) mm
FontB:9*17 dots, 1.1(W)*2.1(H) mm
Simplified/Traditional: 24*24 dots, 3.0(W)*3.0(H)
Line spacing: 3.75mm (Default)
Barcode Types:-
1D Barcode- UPC-A/UPC-E, JAN13(EAN13), JAN8(EAN8), CODE39/ITF, CODABAR,CODE93
2d Barcode- QR CODE
發票收據
從哪裏我可以下載這個SDK? – Amalo
編程手冊在這裏http://www.issyzonepos.com/uploadfile/downloads/58MMPrinter%20Programmer%20Manual-20150312.pdf –
您是否成功打印過收件? –