kingsley143
5th July 2016, 09:16
I am printing QR code on zebra printer. I am not able to put data on new line in QR code. All data is coming on same line. How can I put it on new line?
My code is as follows:

seq.puts("^FT100,540^BQN,2,10^FDMM,B0200Company: " & str$(get.compnr()),seq.id)
seq.puts("^XA",seq.id)
line0 = sprintf$("%s%s%s","^FO100,100^BQN,2,10^FH^FDMM,B0024ItemCode_0D_0ADescription",tigbb409.item,"^FS")
seq.puts(line0,seq.id)
seq.puts("^XZ",seq.id)
seq.puts("Item Code: " & tigbb409.item,seq.id)
seq.puts("Packet No.: "&str$(tigbb405.pktn),seq.id)
seq.puts("Cabinet Number: "&str$(cabinet.no)&"""",seq.id)
line0 = sprintf$("%s%s%s","^FS^FT120,580^ASN,34,24^FD",bar.code,"^FS^PQ1,0,1,Y^XZ")

I want my data in Qr code to look like as follows:
Itemcode
Packet No
Cabinet No.
etc

mark_h
5th July 2016, 15:24
Been a long time zince I look at zebra code - but I thought you wanted to use commands like ^FO to position the printer where you wanted to print on the label. Just try using something like ^FO100,100 for the first line, then second line try ^FO300,100, then 3rd line like ^FO500,100. Now I know font size comes into play, but if I recall even using the RMCis Label product it would take me a few tries to get my label looking correct.

bdittmar
5th July 2016, 15:54
Hello,

If you are writing ZPL for your printing needs and intended on including a 2D QR Barcode within your Label
contents that requires a carraige return/line feed to separate data within the barcode, see the example below:

In order to include a carriage return/line feed within the barcode, you need to include a ^FH (Field Hex)
command within the barcode command structure to allow for special hexadecimal characters to be used.
If a carriage return/line feed is needed, the hex value for this would be "_0D_0A". You also need to
include the "B" switch command to specify the amount of characters that will be contained in the data
to ensure the barcode data is not truncated (spaces are seen as characters). See below for example:

^XA
^FO100,100^BQN,2,10^FH^FDMM,B0024First Word_0D_0ASecond Word^FS
^XZ

The barcode output should scan as follows:

First Word
Second Word


So use _0D_0A between the values in barcodevariable.

Regards