leading zero data in data matrix using ZPL

// Expert user has replied.
S SCOTT BENDURE 3 years 7 months ago
276 3 0

Hello,
 
I cannot seem to add a leading zero in a data string for Data Matrix.  Here is my
 
^XA^PR6
^FO200,200^BXN,30,200,,,,,
^FD01-101-01
^XZ
 
Data prints as 1-101-01
 
Have tried to add a tilde in the "g" parameter and then the decimal equivalent
^XA^PR6
^FO200,200^BXN,30,200,,,,~,
^FD~d0481-101-01
^XZ
 
Which prints an invalid barcode.
 
Thanks for the help!
 
Scott B.

Please Register or Login to post a reply

3 Replies

M Manuel Caicedo-Rivera

Hi Scott,

Try this option:

BXN --> Normal orientation, or BXI --> inverted orientation. I used Zebra Designer Tool to generate the right ZPL code. If you want to do the same, please, donwload a free version from the link below, but you should choose the driver with extension ZPL name.

ZebraDesigner Basic Barcode Label Software | Zebra

For my test I used a ZD620 desktop printer with driver in ZPL.

^XA
^MMT
^PW609
^LL0406
^LS0
^BY60,60^FT259,158^BXN,5,200,0,0,1,~
^FH\^FD01010101^FS
^FT162,69^A0N,28,28^FH\^FDTest with leading Zero^FS
^PQ1,0,1,Y^XZ

Please, let me know if this worked.

Thanks,
MC

S SCOTT BENDURE

Hi Manuel,

Thanks for reply - Does the same thing and drops the zero.  I think it may have been an issue with a scanner app I had for my phone.  I tried a datalogic 2D scanner on my PC and scanned into notepad - no problems with the leading zeros.  I guess no problems unless you have a phone app that cuts it off.  I've been looking around for another Iphone apps to test.   Also hope to try a cordless 3600 unit hooked to a mobile device soon.

Will let you know if I am able to determine what may be going on.

Thanks again!

M Manuel Caicedo-Rivera

Hi Scott,

I believe that it would be something related to your scanner device. I tested with a TC51 and DataWedge installed in a demo lead app, and the barcode was captured perfectly well with the leading zero, see my image below. One workaround could be by adding a prefix to your string in your app.

I hope this helps,
MC

CONTACT
Can’t find what you’re looking for?