2

I'm using Zebra ZPLII to create a label with a QR code to open an specific url. When I use iPhone camera to scan the QR phone shows "unusable data" and when I try with an external QR reader the text extracted from the QR is not the same from the label. For example if I write www.google.com the string that I have from reading the QR is .google.com if I use https://www.google.com the result is ps://www.google.com

This is my label desing

^XA
^FX Top section with company logo, name and address.
^CF0,60

^FO220,50^FDIntershipping, Inc.^FS
^CF0,30
^FO220,115^FD1000 Shipping Lane^FS
^FO50,155^GB700,1,3^FS

^FX Third section with barcode.
^BY5,2,70
^FO300,95^BQN,2,4^FDwww.google.com^FS

^XZ

For testing I'm using http://labelary.com/viewer.html

User1899289003
  • 850
  • 2
  • 21
  • 40

2 Answers2

6

You are missing some of the parameters for the ^BQ and ^FD commands.

^BQ parameters:

^BQa,b,c,d,e

Where

a = Orientation
b = Model
c = Magnification factor
d = Error correction
e = Mask Value

The last two parameters are actually brought into the ^FD command after the ^BQ. Strange design, but that's how it works.

Full Barcode String

^FO300,95^BQN,2,6,M,7^FDQA,www.google.com^FS

Full ZPL for sample label

^XA
^FX Top section with company logo, name and address.
^CF0,60
^FO220,50^FDIntershipping, Inc.^FS
^CF0,30
^FO220,115^FD1000 Shipping Lane^FS
^FO50,155^GB700,1,3^FS
^FX Third section with barcode.
^BY5,2,70
^FO300,95^BQN,2,6,M,7^FDQA,www.google.com^FS
^XZ

Documentation:

https://support.zebra.com/cpws/docs/general/EncodingUnicode_QRCode.pdf https://support.zebra.com/cpws/docs/zpl/13979l-010_ra.pdf

EdHayes3
  • 1,777
  • 2
  • 16
  • 31
  • More uptodate version of the ZPL Programming guide: https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf – Delphi Coder Dec 10 '19 at 06:11
-2

Find an easy solution, seems that the problem is that all the text after ^FD is not interpreted as text or something like that. To solve my problem I just did this:

^FO300,95^BQN,2,4^FDwww.google.com^FS

change to this:

^FO300,95^BQN,2,4^FD             www.google.com^FS
User1899289003
  • 850
  • 2
  • 21
  • 40
  • 1
    Although this may work, it's not the proper way to create a QR code. Please find answer I posted which explains the correct parameters/formatting of the ZPL. – EdHayes3 Dec 09 '19 at 20:49