ZPL - Set barcode width to fit in label

Viewed 521

I have the following ZPL code:

^XA 
^MMT
^FT450,30^A0,N,10,20^FH\^FDValid Until^FS
^FT435,44^A0,N,13,20^FH\^FD17/02/2037^FS
^FT20,90
^BY1,1,23
^B3N,N,35,N,N
^FD3800231000010087005792152521000235^FS
^FT260,190^A0,N,11,16^FH\^FDSN:  00059 0036712924^FS
^XZ

I need to reduce the barcode width, ideally to end where the date start.
Checking online I saw that most of answer suggest to set ^BY1,1, but still the barcode is too long.

1 Answers

You cannot just shrink the size of a barcode. The lines that are 1px wide cannot be shrunk any further.

Seems you are encoding: 3800231000010087005792152521000235. That's quite a bit for a 1D Code 39 barcode. A Code 128 code (^BC) is a bit more condensed. Else, try a 2D barcode (like QR or Datamatrix) if you want to encode that much data.

Related