Search code examples
androidprintingzebra-printersandroid-bluetooth

android print and zebra ticket with 220 ms


I am developing an app, and I need to print ticketing.

my tools are: Zebra MZ220 printer ZebraDesigner v2 eclipse

in connecting the printer, and print test pages.

but my problem comes when I want to bring the format of the label set.

I created one called etiqueta.lbl label, and when I want to pick up this format in android, I get read but I get the name of etiquet.fmt and fields which introduces the labels do not appear in android, not as read correctly.

I have installed zebra utilities and sample code provided, but does not say anything

thanks

UPDATE: I'm working with bluethooth ,¿they could work with this printer with 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 enter image description here

and this is the identifier we introduce in the zebra D Design enter image description here

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: in the end this is what happened:

the two response helped me a lot,I created a small class that I printed with the printer language, CPCL not support other. thank you very much


Solution

  • How did you export the label from ZebraDesigner? Is it CPCL or ZPL? Do the built in format labels in ZebraUtilities work for your printer?

    An MZ220 is a CPCL printer, so you need to give it CPCL. The saved .lbl file from ZebraDesigner is NOT ready to go for a printer, you need to export the label as CPCL and feed that to the printer