如何使用java编程语言将zeric lp 2824 plus打印机打印阿拉伯字符

时间:2017-02-01 18:55:50

标签: java printing arabic zebra

我正在尝试使用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());
            }

0 个答案:

没有答案