ZPL - Group Separator in a QR Code reads "IJ" - printing

I have been trying to print Group Separators using ZPL, but I can't seem to find a way to do that...
I have tried:
Copy and paste Group Separator directly in ZPL
Insert Hex of Group Separator (_1D) in ZPL
ZPL Code to reproduce the problem:
^XA
^FO100,100^BQN,2,6
^FH^FDA,GS--_1d^FS
^XZ
Online ZPL Emulator Result
It prints a QR-Code, however, we get the following string when we scan the QR-Code:
GS-IJ-IJ
It seems like ZPL converts Group Separators into "IJ". I have no idea why this is happening, does anyone know how we can do this?
Thanks in advance.

It turned out that this was a problem of the emulator.
When I printed the label using an actual ZPL printer, the code above correctly create QR Code with Group Separators inside.

Related

need to print greek characters from zpl ii commands using a zebra printer

i have problem printing greek characters to a Zebra GC420 desktop printer. My code is:
$printarr[] = '^XA^CWZ,E:TT0003M_.FNT^FS^XZ^XA^FWN^FO70,50^A0,30,25^FH^FD'.labels_utf8_parse($name).'^FS^FO70,90^BY2^B3,,100^FD' . $node->field_o['und'][0]['value'] . '^FS^XZ';
What am i doing wrong? Instead of greek letters i get crosses. The strange part is that in another area of the code,the below code prints correctly greek characters:
$toprint = '^XA^CWZ,E:TT0003M_.FNT^FS^XZ^XA^FWR';
What should i do, how should i proceed to see what is the problem and how could i solve it?
You need to set the character encoding to UTF-8 using ^CI28. Put it near the top of the format, for example, after the ^XA^FWN.

ZPL command barcode 3 zeros creates issues

I am trying to print to a GT800 Zebra printer thru serial port.
I am using ZPL. I want to control the width which is fine in auto mode. To address that in the >^BC> command I am using Auto mode as no other size setting under ^BY works
Following is the code
^XA
^MMT
^PW831
^LL400
^LS0
^BY2,,76^FT225,141^BCN,76,Y,Y,N,A
^FD:RNIP29200082034^FS
^FO225,157^A#N,18,10,E:CAL002.FNT^FD26030-0892R^FS
^FO383,157^A#N,18,10,E:CAL002.FNT^FD08.01.20 12:00PM^FS
^FO225,187^A#N,18,10,E:CAL002.FNT^FDLAMP-DR RH^FS
^FO453,187^A#N,18,10,E:CAL002.FNT^FDXBA3^FS
^PQ1,0,0,Y
^XZ
There is a funny problem. If the ^BC mode = A then if three zeros come together gives issues for eg ABCD29200082034 it prints ABCD29200 and does not complete the barcode. But the other lines are getting printed. But if the data is ABCD29200182034 , there are no issues.
If BC mode = U then even if the code is ABCD29200182034 it prints 292001820347. Note 7 is added in the end.
I am clueless as to what is this issue. I remember facing this same issue in Honeywell printer too once.
Thanks
NOTE : I replaced the 000 with 111 and the problem persists.
ZPL Manual says the following
A= Automatic Mode :This analyzes the data sent and automatically determines the best packing method. The full ASCII character set can be used in the ^FD
statement — the printer determines when to shift subsets. A string of
four or more numeric digits causes an automatic shift to Subset C.
Note , it says a string of four or more numeric digits causes an automatic shift to subset C, but when the same string is 290010 it has no issues. I am really lost

How can I print a subscript like E_{n} with ZPL II?

I want to send a String to the Zebra printer in which I have e.g. the energy E_{N} printed whereas N must be a subscript of E. I can send strings to the printer which are in a normal format (e.g. 'bla=7'), but I have no idea how to include this subscript. Up to now I have strings like '^FDbla^FS'
I searched for the problem but could only find a solution for fixed problems like ^2, which were solved with a special character. There was no general solution.
The way I solved this was to strip out the subscripts and print them on the next half-line down.
^XA
^FT78,76^A0N,28,28^FH_^FDH PO ^FS
^FT78,90^A0N,28,28^FH_^FD 3 4^FS
^XZ

How to print different labels in zebra printer in one batch

I need to print a batch of product labels in a zebra printer. I have a file that is built like this:
^XA
^LH30,30
^FO20,10^AF^FDAle Beer^FS
^FO20,100^BY3^BCN,100,Y,N,N
^FD574759766878^FS
^FO20,280^AF^SNSK: US/0001,1,Y^FS
^FO20,320^AF^SNC: Alcoholic,1,Y^FS
^XZ^XA
^LH30,30
^FO20,10^AF^FDCherry Cola^FS
^FO20,100^BY3^BCN,100,Y,N,N
^FD825812897457^FS
^FO20,280^AF^SNSK: US/0018,1,Y^FS
^FO20,320^AF^SNC: Soft Drinks,1,Y^FS
^XZ^XA
^LH30,30
^FO20,10^AF^FDCola^FS
^FO20,100^BY3^BCN,100,Y,N,N
^FD881108188209^FS
^FO20,280^AF^SNSK: US/0019,1,Y^FS
^FO20,320^AF^SNC: Soft Drinks,1,Y^FS
^XZ
So, I'm trying to send multiple labels to the printer. I don't have the machine, I am using the Zpl Printer Chrome emulator. The thing is that I only see the first label.
Is this correct? How can I print all my labels correctly?
Thanks

Printing multiple (different) labels in one ZPL commands

I have followig task:
I am generating sequence of consecutive barcodes eg: 117-1, 117-2, 117-3, 117-4...
I have to print labels with those barcodes: first label with first code, second label with second code and so on.
Currently I am printig labels one-by-one. Is it possible in ZPL to combine multiple labels to one command for printer? Something like:
^header
print first one
take next label
print second one
take next label
...
^footer
I am generating ZPL so there is no need to introduce variables in ZPL.
My current code for printing single label
string zpl = string.Format(
#"^XA
^LH5,5
^CF0,129
^FO20,10
^FB800,4,,C
^FD{0}
^FS
^FO160,150
^FB800,1,,C
^BY3
^BCN,150,N,N,N
^FD{0}
^FS
^XZ
", code.ToString());
You can concatenate ZPL files to merge several labels into one.
Untested code would be something like this, if I understand your requirements:
String template = "^XA^LH5,5^CF0,129^FO20,10^FB800,4,,C^FD{0}^FS^FO160,150^FB800,1,,C^BY3^BCN,150,N,N,N^FD{0}^FS^XZ";
String zpl = String.format(template, code.toString());
zpl += String.format(template, code2.toString());
...and so one, or use a loop

Resources