ZPL barcode guide

ZPL ^BY Barcode Defaults

^BY controls module width and ratio for many barcode commands. It is small, but it can make or break scan reliability.

^BYBarcodeModule width
Check barcode scan readiness

Module width example

A module width that is too narrow may look clean on screen but fail after thermal printing, especially on worn media or low darkness.

^XA
^PW812
^LL406
^FO50,80^BY2,3,120
^BCN,120,Y,N,N
^FDABC123456789^FS
^XZ

Change modules without confusing DPI

At 8 dpmm, a 2-dot module is 0.25 mm wide; at 12 dpmm it is about 0.167 mm. Reusing the same ^BY value after changing density changes the physical module size. Compare representative short and long payloads, preserve quiet zones and scan the printed sample. Increasing darkness cannot reliably repair a module that is too narrow.

ZPL ^BY Command Guide - Barcode Module Width