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#?
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
Yes, I know there isn't much to edit in that label, but it was just an example because I have a "more complex" label, where I have some text field as Fixed Data, and others should be variable (assigning the value from C# app). Is there any way to unzip the image to obtain ZPL code?
@AlessioRaddi The ZPL code, no. The image contains the final rendered bitmap.
Sorry for being so stubborn, but there is no way to get ZPL code unzipped from "Print to File", right?
@AlessioRaddi The result you got from "print to file" is ZPL. Only the text "Hello World" was converted to bitmap instead of a ZPL text command, whyever