2
votes

I am passing a ZPL code to a Zebra printer. And in this ZPL code, I have a portion where it will generate a QR Code. The QR Code's value is from string that I got from using a barcode scanning function in the mobile app im developing for WM6.5. The string result from the scan looks like this: Name:John Smith Gender:Male Position:Developer

I need to pass this string to a datagrid. So I parse it line by line via "\n" or environment new line. passing it to the datagrid is ok. But when I print out the string result to a QR Code on a Zebra printer. It seems like the new lines are not being included in the QR Code.

2

2 Answers

4
votes

If you want to pass in non-printable characters, use the ^FH command to pass it in as a hex value

^XA
^FO100,100
^AD^FH
^FDTilde _7e used for hex^FS
^XZ

This will print out a ~ instead of _7e

1
votes

ISO-8859-1 encoding characters

HTML     OCTL   HEX   CMP   CHR   MEANING
------ + ---- + --- + --- + --- + ------------------------------

 | \012 | =0A |     |     | Line feed (ASCII NL, newline)

Use 0x0A instead of \n ?