Closed hewrin closed 5 years ago
Seems you mean the command definition in ESCUtils.java like:
/**
* 选择加粗模式
*
* @return
*/
public static byte[] boldOn() {
byte[] result = new byte[3];
result[0] = ESC;
result[1] = 69;
result[2] = 0xF;
return result;
}
/**
* 取消加粗模式
*
* @return
*/
public static byte[] boldOff() {
byte[] result = new byte[3];
result[0] = ESC;
result[1] = 69;
result[2] = 0;
return result;
}
Unfortunately, I have't exposed them to the module. How ever you can try to send these commands via sendRAWData(base64String) , like:
SunmiInnerPrinter.sendRAWData(base64.encode([0x10,69,0xF])); // not tested actually.
So I do something like
await SunmiInnerPrinter.sendRAWData(base64.encode([0x10, 69, 0xF]))
await SunmiInnerPrinter.printOriginalText("HELLO");
Is this correct?
yeah, should be something like that. But you need more tests to make things done i think.
Is there a way to use setBold method?
I see it in the Java files, but not sure how to use it in Javascript.
Thank you very much