Warm tip: This article is reproduced from stackoverflow.com, please click
barcode zpl

Scanning Zebra Printed ZPL CODE-128 Barcode not returning single integer value for AI(37) but works

发布于 2020-05-21 10:54:12

I am trying to print a GS1-128 Barcode using ZPL and when I print this out for some reason everything prints fine except the number in the AI (37), I get 3715 (the 4 is missing), if I change the 4 to a two char integer value such as 04 or 14 I am able to scan it in the barcode.

^BCN,390,N,N,N
^FD>;>8(02)19410525013094(37)4>8(15)200330>610BAT100^FS

The only issue is the system I am working with stores the value for AI 37 as integers, so if the QTY is 4 then it will print as a 4, but i am getting nothing at the moment.

Any assistance would be appreciated.

Thank you, Omeil

Questioner
Omeil
Viewed
32
Mark Warren 2020-03-05 19:49

You are manually selecting the numeric mode of code128, using >; at the start of the data field. Numeric mode encodes pairs of digits into single codewords. And unfortunately the printer silently drops any unpaired digits.

You must either zero-pad your data when in subset-C or switch to ZPL's automatic mode for code128, which does a good job at minimizing symbol length. For your data, keep the >; start mode and then let the automatic-mode shift or latch to subset-B as needed.