Search code examples
qr-codezebra-printerszpl

Randomly missing QR codes missing from label


My problem is that the QR Code is missing on some of the labels. My ZPL Code looks as follows.

^XA
^CI27
^CWY,ARIALSMY.FNT
^FO697,101
^BXN,5,200,26,26,,_,^FH^FD_44_45_41_85_00_00_00_00_14_A0_02_0D_73_B6_00_E8_28_25_85_91_07_68_62_B4_B9_A9_9B_85_68_93_26_78_24_6A_7F_5F_B9_64_7B_E6_00_00^FS
^XZ

Why is it missing on this label when i print it but it is visible if i put it in the ZPL online viewer?


Solution

  • In case someone else has a similar problem. We use underscore as our escape character.

    ^BXN,5,200,26,26,,_,
    

    So if the code contains Hex 5F the code wont work / wont show up. that is also the case with any other character we would use. So we doubled the Character and the code now works in every case.

    if (qrCode.Contains("_5F"))//5F is hex for underscore qrCode.Replace("_5F", "_5F_5F");