我正在尝试使用java打印阿拉伯语文本,但每次标签都是空的
String commands = "^XA\n" +
"^LH 10,10\n" + "^FO40,12\n" + "^ADN,35,10\n" + "^FDname: " + patient.name + "^FS\n" +
"^LH0,0\n" + "^LH 10,10\n" + "^FO40,55\n" + "^ADN,35,10\n" + "^FDnumber: " + patient.number + "^FS\n" +
"^LH0,0\n" + "^LH 10,10\n" + "^FO40,95\n" + "^ADN,35,10\n" + "^FDrotba: " + patient.degree + "^FS\n" +
"^XZ";
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
Doc doc = new SimpleDoc(commands.getBytes(), flavor, null);
try {
job.print(doc, null);
} catch (PrintException ex) {
System.out.println(ex.getMessage());
}