Reputation: 622
I downloaded ZebraDesigner 3 to create a custom label with a text field where I wrote "Hello World".
Then I wanted to get its source code by "print to file", but when I open it with any editor I can't find what I wrote previously (Hello World).
What I wanted to do is creating a label with some text fields that are variable because they will get values from my C# application.
This is what I get from .prn file (file created by printing to file function)
^XA
^MMT
^PW639
^LL0320
^LS0
^FO192,128^GFA,01792,01792,00028,:Z64:
eJzt0jFOAzEQBdCxXLjzXsBarjEFYq/kdBRRAhfIebYcxAE4ArMXQKZzgdaMhygOiSKElAKkHRe70iu88/8CLPMfhuUARnmLJhmSJ4L/laFJ9uGS2fHqFuzo4NQ6wtgRBBccbMwLul2zIWEckpopj69489ZsmzFus5otTzMO895K4XyLMa/By7jnKeH9phkHjBy+DCbG2B9sIo8r7tU6eCdM/eE+NfJqHlaE3HaYyqwmnxKuZgQ/mkQ9nhmD7lDtdAdmr7tXk92p7S62z8xmkyUzwvXdUdYfmrX8SkmyppZ17ShrR9WkI/rWUcfabTXpllq3yyzzV+cTr8C3dA==:ED50
^PQ1,0,1,Y^XZ
How can I change those text field from C#?
Upvotes: 1
Views: 4472
Reputation: 11
First of all when you crete the label file layout and you introduce the text you will need to use only Zebra printer fonts. At the font style tab you select "Show printer fonts only"
. With this option all text will remain text and will not be converted to graphic image.
Second part is the driver you use. You need to use ZPL printer driver
and not EPL.
You export by selecting print to file or you create a fake port what you direct to a txt file. The print to file option will create PRN file but content is 100% ZPL.
I did this several times and it is working. I created a lot of labels with complex layouts and variables and never had any issue exporting them.
Upvotes: 1
Reputation: 78175
The "Print to file" feature sends the label image to the Zebra driver, which converts it to a picture, encodes and ZIP-compresses it, and produces a ZPL file where the only payload is that single picture (and several supplementary commands to set label dimensions and print quantity). You can't blame the driver, it would be pretty hard to convert random document from a random Windows application to a meaningful series of fields with data.
The payload command in your file is
^GFA,01792,01792,00028,:Z64:
eJzt0jFOAzEQBdCxXLjzXsBarjEFYq/kdBRRAhfIebYcxAE4ArMXQKZzgdaMhygOiSKElAKkHRe70iu88/8CLPMfhuUARnmLJhmSJ4L/laFJ9uGS2fHqFuzo4NQ6wtgRBBccbMwLul2zIWEckpopj69489ZsmzFus5otTzMO895K4XyLMa/By7jnKeH9phkHjBy+DCbG2B9sIo8r7tU6eCdM/eE+NfJqHlaE3HaYyqwmnxKuZgQ/mkQ9nhmD7lDtdAdmr7tXk92p7S62z8xmkyUzwvXdUdYfmrX8SkmyppZ17ShrR9WkI/rWUcfabTXpllq3yyzzV+cTr8C3dA==:ED50
, which unzips to
There is not much to edit there.
In order to manually achieve the same, you would write:
^XA
^MUm
^FO10,10^A0,10^FDHello World^FS
^MUd
^XZ
Upvotes: 3