ZebraDesigner - Saving zpl code does not actually save code as zpl - zebra-printers

title might be a bit weirdly formulated, so let me try to explain:
I use ZebraDesigner 3 Essentials in order to make a label. I then "print to file", which leaves me with a .prn containing code. I also tried the answer from this question:
How to get ZPL code from a ZebraDesigner label?
, leaving me with a .zpl file, which has the same content as the .prn file.
That content is similiar to zpl, but it seemingly is not the same. This is the result of a simple label, where "Text" is in the middle of it:
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD20^JUS^LRN^CI0^XZ
^XA
^MMT
^PW1046
^LL0267
^LS0
^FO448,96^GFA,00768,00768,00012,:Z64:
eJzl0TEOQiEMBuASho69gb2I4V3rDcRg3sHEm3CEjh2M6PMV0Lg4GBc7fUMD/w8AfzBUq7zZpWF8NfgMnxhlmC+Y8SQPT1dfyBzZCU+bZ0oSbF8w6b7Zpxg3u+Jz0GEWc62ZyzDlYWwu93pP7vur2zniIEi/N0cdGdQywIzHnvPAruzMay9G6X1pUXsHSnjWL/7Yz+YGfRNqLw==:7BBD
^PQ1,0,1,Y^XZ
The second line from the button upwards is the problem, I believe. Around there is where, normally, "Text" would be standing, however, now there's just gibberish.
I absolutly need this to be saved correctly, as I later need to access it via python. Please help me by explaining why this happens, and / or how I can fix this.

You need to use a font that is built into the printer. If you set the font to Zebra 0 you get something like:
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR4,4~SD22^JUS^LRN^CI0^XZ
^XA
^MMT
^PW812
^LL1218
^LS0
^FT160,391^A0N,135,134^FH\^FDhello^FS
^PQ1,0,1,Y^XZ

Related

Dotted or dashed lines possible with ZPL II?

I'm working on creating a new ZPL label, and would like to draw a dashed line, but I haven't found any information on how to do that or if it's even possible.
Am I asking too much of ZPL?
You can easily create a dashed pattern with ^GF. It's not the most efficient way in terms of ZPL code size, but it's very easy to amend by hand:
^XA
^FO10,10
^GFA,100,100,50,FFFFFF0000FFFFFF0000FFFFFF0000FFFFFF0000FFFFFF0000FFFFFF0000FFFFFF0000FFFFFF0000FFFFFF0000FFFFFF0000^FS
^IS1.png,N
^XZ
Result:
You should use the zebra zpl designer program , which allows you to create the label like WYSWYG (what you see is what you get or something like that) and then print it to a file, to have a .prn file to you can inspect the code. And then you can use this site: http://labelary.com/viewer.html to prove it.

Printing Images with ZPL code

I'm using ZDesigner to create my label and generate the zpl code. My label have several text boxes, a barcode, and a logo image.
I used the generated code on this webpage -> http://labelary.com/viewer.html, and the output was fine.
When I send the same zpl code to the printer (GC420D, installed as generic/text only) the logo image it's not printed.
ZDesigner uses the command ^GFA to send the image to the printer, I tried with diferent extensions (.pgn, .jpg and .bmp) and the results is always the same, no logo.
Any ideas why?
generated code:
^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW570
^LL0320
^LS0
^FO220,170^GFA,8000,0800,00020,:Z64:
eJztkjFugzAUhp+dICrUAUsQ1ogJsVXNASzV6dTBSH7KmiN4SMWKsvcOiAlxigw9QIdwnxooGFVl6FCpQ/7Blu3P7/2/ZYCb/pvIm2T37y9XLpk/bRbdUEEMiQUfpe88w+b4MLtcjMOd3XMA1oILIcnfmabnpvSg9GhTTHvuKtcbcty4OZ9z9cCV1h+RKiA8AGI5j5ZJSguT1nKuy/VuxXdAjjOuSJKOo7ZviBcZkEtA2svUNo2rnvOsv/BwQH1yQUczf55XlB2XThxRao9KOiCVM3LUcLRKht5jCpZH4auOiNaufZfaBKnTc5l4Iyfwim2LLX5ga9vWXnNOq6ZMm7FtdthFeZY/nXSkYVlrMRRV49oeUTrjmE/QjAy/MvjwswRBRGkL9jiNId7205De2JNhliECw6Hg9DTfxZX5eYYRBjbXhHU3Ouxdku5vMiY7h8gJLtlb9/mEMrn3xqjo2m5n5zTezuIxE4JlRnKhHHA7CaOlFHMRxpbc3XTTr/QJea9YBw==:F9E4^FS
^FT128,67^A0I,12,14^FH\^FDData de Emiss\C6o^FS
^FT128,129^A0I,12,16^FH\^FD#DOCUMENT#^FS
^FT76,103^A0I,12,16^FH\^FD#VAL#^FS
^FT100,49^A0I,12,16^FH\^FD#DE#^FS
^FT255,50^A0I,12,16^FH\^FD#CE#^FS
^FT408,46^A0I,12,16^FH\^FD#CC#^FS
^FT110,209^A0I,12,16^FH\^FD#Eur#^FS
^FT134,227^A0I,12,16^FH\^FDRecibo n\A7^FS
^FT124,101^A0I,12,16^FH\^FDEur^FS
^FT300,67^A0I,12,19^FH\^FDC\A2digo Entidade^FS
^FT434,67^A0I,14,16^FH\^FDC\A2digo Cliente^FS
^BY2,3,20^FT441,119^BCI,40,Y,N
^FD>;12345678>69^FS
^PQ1,0,1,Y^XZ
here is my answer a little late but it may be useful for someone. I had a problem when performing a print service for an android application, when pasting the zpl code into the text editor I was not noticing that for some reason some blank spaces were being added, I realized until I copied the code and I viewed it here http://labelary.com/viewer.html
after that I remove the blank spaces and the image could be displayed
zpl code with blank spaces

Text is printed incorrectly using ZPL

I print a text using ZPL but they are printed incorrectly. It has gaps in the middle. They are printed correctly to the real printer via the ZebraDesigner. But they are wrong when printing via ZPL:
^FT246,70^A0R,16,16
^FB900,2,,
^FDMaisstaerke, Austernuce, Cashewnuss,Pilz, Mais, Lattich, Pack Choi,Sojasprossen^FS
It is printed as 'Maisstaerke, Austernuce, Cashewnuss,Pilz, Mais, Lattich, Pack Choi, Sojasprossen'
(there is a big gap after 'Mais,').
http://screencast.com/t/sTiaxC3cMg
http://screencast.com/t/0QkypnsPyF89
Please help.
Thanks
I'm unable to reproduce the issue, but the field block width seems rather large; you didn't specify any label dimensions in the original post. If you use the following code--a combination from the original post and your comments:
^XA
^PW560
^LL560
^LS0
^FO246,70^GB28,300,,^FS
^FT246,70^A0R,16,16 ^FB300,2,, ^FDMaisstaerke, Austernuce, Cashewnuss,Pilz, Mais, Lattich, Pack Choi,Sojasprossen^FS
^PQ1,0,1,Y
^XZ
I can reproduce what is possibly the issue--the field block automatic word wrapping--by reducing the field block width to 300 dots.
I also drew a box around the block for visualization. You can test in on the Labelary Viewer.
Finally, if you're somehow composing the data make sure there are no special (non printable, such as tab, non-UTF-8 or accented) characters in it, and if so, you will have to pre-escape them.

Zebra RW 420 not printing last or first inch using ZPL

Zebra RW 420 not printing last or first inch(depending on rotation) using ZPL.
this link was suppose to give a solution since it is the same symptom; but I've try all combinations of "Back Feed" (~JSN, ~JSA, ~JSB) with no results.
here is my ZPL code(generated from ZebraDesigner print to file command) It doesn't print "Hello 22" completely:
^XA~TA000~JSN^LT0^MNM^MTT^POI^PMN^LH0,0^JMA^PR2,2~SD10^JUS^LRN^CI0^XZ
^XA
^MMT
^PW812
^LL2233
^LS0
^FO272,76^A0N,56,55^FH\^FDHello 11^FS
^FO320,2000^A0N,56,55^FH\^FDHello 22^FS
^PQ1,0,1,Y^XZ
I had the same problems with print output. I ended up abandoning use of ^FO and went with ^FT, and everything has been perfect since. I don't know why ^FO is so temperamental, but ^FT is very straightforward. You get what you expect.
I'd suggest getting rid of that entire first row that ZebraDesigner made. You don't need it.
I've solved the problem with the help of Zebra support.
The actual problem was the var "zpl.label_length" that was set to 2014 instead of 2233; the ^LL command is ignored in this printer and the label length is controlled only by "zpl.label_length".
It printed the whole label(11")after sending the command:
! U1 setvar "zpl.label_length" "2233"

Which should not be included in this ZPL Code?

I am developing a Windows Mobile App that requires printing into a Zebra printer. Problem is, I do not have the printer with me here in my country since the client did not provide any.
My approach was to design a label first in ZebraDesigner2, then print out the label into a text file. Printing the label to a text file instead of a printer sends out the ZPL Code to produce the label I was trying to print. Hence, I can generate ZPL codes faster by designing a label first then seeing the ZPL code. Kinda like having a drag and drop GUI with a background XML.
Say that I have this simple label that contains this text:
Hello World!
If I print this in ZebraDesigner2 it would be written to my text file as:
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW609
^LL0406
^LS0
^FT1,29^A0N,28,28^FH\^FDHello World!^FS
^PQ1,0,1,Y^XZ
My main question is, which one do I include in my C# Code if im going to send this code to the printer via my Windows Mobile C# app? Do I include the part with ^XA until ^XZ? I believe that CT~~CD,~CC^~CT~ should not be included in my code If im not mistaken.
Late answer, but since this is getting viewed...
The CT line and first set of XA..XZ sequence sets up the modes, label length, printable area, etc.
If you remove those, it will take those settings from the label/printer settings, which is usually what you want. The printers can sense the length and width of the label.
Leaving them in can cause big problems, because if you define the printable area in your label, and then the next label type submitted does not, it will use the settings you have defined -- which can cause blank areas in the label, eg. cutoff USPS Label barcodes that are printed after your Zebra Designer custom labels.
Found this out the hard way - leave those out, and you should leave out of the remaining XA..XZ sequence the MMT, PW609, LL0406, and LS0 as well - your Hello World will not be affected.
If you really want to limit the area printed to, set up margins inside the printable area, etc, refer to the manual.
you have to look at the programmers guide before you remove anything of the code. The CT~ command for example changes the control prefix.
Search the internet or zebra.com site for "ZPL Programming guide".
So, leave the text file as is and then include that into your windows mobile application.
PS: zebra offers SDKs for label/receipt printers: http://www.zebra.com/gb/en/products-services/software/adapt-software.html
PS2: without a test printer you may get bad final results.

Resources