Printed QR missing 3 first characters (iOS)

Tags: 

Hi im using stored formats on printer to print qrcodes using ZSDK_API iOS, to printer ZD620.

im sending a String to be converted on QR but if i use camera to read QR code, info it´s incomplete first 3 characters are missing...

Im sending this as variable ton be generated as qrcode
012070AAC7D51C9821A5ADE4EB09E9D59891022073403EED9E5E2546602804468669E5E9

But this is what i get after scan code
070AAC7D51C9821A5ADE4EB09E9D59891022073403EED9E5E2546602804468669E5E9

The first 3 characters are missing "012", multiple checks I have made to make me sure im sending this string complete before sending.

Ive attached prn file and a screenshot of generated qrcode.

Steven Si
QR CODE MISSING FIRST THREE CHARACTERS WHEN USING ZPL LANGUAGE

This is a common question being asked often. The reason is that the template used to generate the QR code is missing the proper switch. Refer this QR CODE MISSING FIRST THREE CHARACTERS WHEN USING ZPL LANGUAGE for more detail.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Abraham Rangel
Hi thanks for your answer,

Hi thanks for your answer, but i don´t know how to apply fix
"Adding QA, right after ^FD, should fix this issue."

if FD fields are not my qrcode, only on the first two labels of text are.
qrcode line dont have a FD field (^FH\^FN3"qrcode"^FS)

(fragment of zpl code on my label)
^FT13,37^A0N,33,33^FH\^CI28^FDSERIAL #^FS^CI27
^FT13,66^A0N,33,28^FH\^CI28^FDSECURITY Token:^FS^CI27
^FPH,4^FT146,37^A0N,33,33^FH\^CI28^FN1"serial"^FS^CI27
^FT225,66^A0N,33,33^FH\^CI28^FN2"token"^FS^CI27
^FT246,299^BQN,2,5
^FH\^FN3"qrcode"^FS

So where i put "QA" in qrcode ?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Steven Si
When you recall the stored QR

When you recall the stored QR code format (the template), you would have sent something similiar to the following recall format to the printer to call out QRLabel.ZPL.

^XA
^XFE:QRLabel.ZPL

...


^FN3^FDQA,012070AAC7D51C9821A5ADE4EB09E9D59891022073403EED9E5E2546602804468669E5E9^FS
^XZ

In the recall format, you would have the ^FN3^FD..... command for "qrcode" variable, i.e. the value shown above for ^FN3 will be placed in the place of "qrcode". That's where you place the "QA," after ^FD -  ^FN3^FDQA,012070AAC7D51C9821A5ADE4EB09E9D59891022073403EED9E5E2546602804468669E5E9^FS

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Abraham Rangel
Still not found FD fields after retrieve format from printer

I used this ZSDK_API method to get format from printer:

NSData *formatContents = [formatUtil retrieveFormatFromPrinterWithPath:formatName error:&printError];
NSString *contentsAsString = [[NSString alloc]initWithData:formatContents encoding:NSUTF8StringEncoding];

output:
^XA^DFQRLABEL,

^FS

~JS

No FD fields yet.
I´ve seen "Exercise 6: ^DF and ^XF — Download format and recall format" pdf, but not contains SDK iOS examples how to "recall".

This is what im been using so far to print before i notice qrcode is missing first 3 characters:

i create template file ".prn" with Zebra Design 3 for developers with "Store to printer" option. I put this file on XCode project to be send to printer
[fileUtil sendFileContents:filePath error:&printError]

To print i call printStoredFormat ZSDK_API method and it print good so far :

[[printer getFormatUtil] printStoredFormat:@"E:QRLABEL.ZPL"
withDictionary:qrData
error:&printError];

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Steven Si
Seems you have some confusion

Seems you have some confusion about Stored Format and Recall Format. I'd recommend to watch the video -  ZebraDesigner v3 for Developers - A Comprehensive Label Design Tool or this post - https://developer.zebra.com/forum/25791. Once the Stored Format file is downloaded onto the printer, you only need to send the Recall Format to the printer to call out the Stored Format. In your Recall Format, you would have the ^FD field. Check out the example in ZPL Programming Guide on Stored Format. There is no need to retrieve the Stored Format and parse the format. All you need is to compose a recall format ZPL file to send to the printer, in which you will put the ^FD there. The ZebraDesigner v3 for Developers tool will generate a template of the recall format for you. Your application just simply replaces the values in ^FD in the recall format before sending it to the printer. 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments