我正在开发一个应用程序,我需要打印票务 .
我的工具是:Zebra MZ220打印机ZebraDesigner v2 eclipse
在连接打印机和打印测试页 .
但是当我想要带来标签集的格式时,问题出现了 .
我创建了一个名为etiqueta.lbl的标签,当我想在android中获取这种格式时,我得到了读取,但我得到了etiquet.fmt的名称,引入标签的字段不会出现在android中,而不是正确读取 .
我已经安装了斑马实用程序和示例代码,但没有说什么
谢谢
UPDATE: I'm working with bluethooth ,¿他们可以使用xml打印机吗?
UPDATE 03/10/2013 09:01 :: printer.getFormatUtil().getVariableFields("utf8"); FieldDescriptionData[] variables = printer.getFormatUtil().getVariableFields(new String(formatContents, "utf8"));
and so is the object
and this is the identifier we introduce in the zebra D Design
as I can do to vega not null and if the name I choose?
Yes, this is my code:
byte[] formatContents = printer.getFormatUtil().retrieveFormatFromPrinter(sFormato);
printer.getFormatUtil().getVariableFields("utf8");
FieldDescriptionData[] variables = printer.getFormatUtil().getVariableFields(new String(formatContents, "utf8"));
there any way to create a dynamic list?
UPDATE 07/10/2012: 到底发生了什么:
这两个回复对我帮助很大,我创建了一个用打印机语言打印的小类,CPCL不支持其他 . 非常感谢你
2 回答
你是如何从ZebraDesigner导出标签的?是CPCL还是ZPL? ZebraUtilities中的内置格式标签是否适用于您的打印机?
MZ220是CPCL打印机,因此您需要给它CPCL . ZebraDesigner保存的
.lbl
文件尚未准备好用于打印机,您需要将标签导出为CPCL并将其输入打印机本文介绍如何使用ZebraDesigner将格式保存到MZ打印机:https://km.zebra.com/kb/index?page=content&id=SO8141&actp=LIST . 请注意,您只需按照该文章中的步骤1和2进行操作即可 . 如果您想要测试Android格式的外观,那么第3步非常有用,但它对于在Android中进行测试没有用 .
按照上面的步骤1和步骤2进行操作后,Zebra Utilities Android应用程序应该会看到格式并允许您调用它并使用用户数据进行打印 .