Question

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

Était-ce utile?

La 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

Autres conseils

This article explains how to use ZebraDesigner to save a format to an MZ-printer: https://km.zebra.com/kb/index?page=content&id=SO8141&actp=LIST. Notice that you only have to follow steps 1 and 2 in that article. Step 3 is useful if you want to test-print your format OUTSIDE of Android, but it is not useful for testing within Android.

Once you follow steps 1 and 2 above, the Zebra Utilities Android app should see the format and allow you to recall it and print it with user-data.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top