我需要在热敏打印机(SAM4S ELLIX40)中打印此图像。
我一直在搜索和测试几个代码,但实际上没有任何效果,他们说“使用这个命令,你会看到一行”,我发送了它,但没有任何反应。
我从手册中尝试了这个命令:
ESC * m nL nH d1…dk
GS * xy d1…dk
我最常尝试的是 ESC *,但我一直不明白如何设置 nL 和 nH。
String text_to_print = "Hello world!";
DocPrintJob dpj = selected_printjob.createPrintJob();
InputStream stream = new ByteArrayInputStream((text_to_pring).getBytes());
DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
Doc doc = new SimpleDoc(stream, flavor, null);
dpj.print(doc, null);
相关分类