Barcodes

^BYBarcode Field Defaults

Sets default bar width, ratio, and height for barcodes.

Category
Barcodes
Syntax
^BYw,r,h

What ^BY does

^BY sets the default module (narrow bar) width, wide-to-narrow ratio, and height for the barcodes that follow. Getting ^BY right is key to scannable barcodes — too narrow and scanners struggle, too wide and it won't fit.

Syntax

^BYw,r,h

Parameters

ParameterDescriptionValuesDefault
wModule (narrow bar) width, dots1–102
rWide-to-narrow ratio2.0–3.03.0
hBar height, dots10

Example

^XA
^BY2,3,100
^FO50,50^BCN,,Y,N,N^FD123456^FS
^XZ

Paste this into the free ZPL viewer to see it render, or convert it to PDF.

See the full ZPL command reference for all 92 documented commands.

Work with your labels, not just read about them

Zentralabel converts, previews, validates, and enriches ZPL labels right in your browser — free tools for one-offs, batch processing for scale.