0

I'm trying to print a Code 128 (Subset A?) barcode to a Zebra label printer. It looks to be printing, and can be scanned by ZXing barcode scanner on my phone, but when using a barcode scanner, it won't read.

Generating the same barcode using MPDF (type="C128A"), generates a barcode with different bars that the barcode scanner we're using does read.

Here's my ZPL: (ZPL Output)

^XA

^BY4,2,164^FT70,330^BCN,,Y,N,Y,N
^FD>9171716171724161925^FS

^XZ 

And the equivalent barcode tag used in mPDF: (mPDF Output)

<barcode code="110118039" type="C128A" size="1.5"/>

Any ideas what I'm doing differently between the two would be greatly appreciated.

2 Answers 2

0

Looks like the issue was scanner configuration at the user end. Despite the differences in bars, both of the above are actually reading correctly.

Sign up to request clarification or add additional context in comments.

Comments

0

I noticed a few problems

  1. You have a ">" in your ZPL within the FD field.
  2. The data you have encoded is not the exact number you are trying to get a barcode for. I wonder how you got what you got, and how it's generating the desired number.
  3. I see you are using the UCC Check Digit = Y parameter. Default is N. You probably don't need this parameter.

Proper ZPL:

^XA
^FO100,100^BY3
^BCN,100,Y,N,N
^FD110118039^FS
^XZ

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.