Search code examples
javac#zebra-printersikvm

How to get variable fields in a label created in the Zebra Designer?


How can I prepare a label in the designer and access the variable fields in my Java/C# code?

With ikvm I converted the Java code to C# and I can connect and print successfully from my C# project.

I prepared a label, print it to a file (setting the port in control panel) and get the TXT file with the ZPL code. How can I retrive the list of variable fields from that string? In the doc I found the method getVariableFields(string formatOnPrinter) but it is only for formats stored in the printer.

Also in the doc the examples with variable fields have this token for the field number and name: \^FN12"First Name" but in my exported ZPL code I see only static text. Do I export it in the right way?


Solution

  • The Print Station app for Android uses the same variable structure as what you are referring to. There is an app note found here: https://www.zebra.com/content/dam/zebra/manuals/en-us/software/print-station-ug-en.pdf

    This requires that you have Zebra Designer Pro. If you are not creating enough templates to justify purchasing the for pay version of designer then you can hand modify the ZPL from the free version of Designer to embed the variables.