Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›ZPL Command Matrix›^B4

^B4 — Code 49 Barcode

Prints a Code 49 barcode: a multi-row, variable-length symbology that encodes the full 128-character ASCII set in a small space.

Syntax^B4o,h,f,m
In Labelixa's previewNot applied in the preview (ZPL1002)

What it does

A Code 49 symbol has two to eight rows. Each row holds four symbol characters that encode eight data characters, between quiet zones and a stop pattern, and rows are separated by a one-module bar. The print ratio is fixed and the rows can be scanned in any order.

Automatic mode (A, the default) chooses the starting mode, does all shifts and compacts the data; numeric mode is used only for runs of five or more digits. In modes 0–5 the data must follow the Code 49 internal character set, with shifted characters sent as two-character sequences; an invalid sequence stops encoding and the symbol carries only the data before it.

In the preview

This command changes the printed label, but Labelixa's preview does not apply it yet. The linter reports it as ZPL1002, so you know the preview and the print will differ.

Example

^XA
^FO100,75^BY2
^B4N,20,A,A
^FD12345ABCDE^FS
^XZ

Two-dot modules, rows 20 times the module high, interpretation line above, automatic mode.

Parameters

ParameterDescriptionValuesDefault
oorientationN · R · I · B^FW
hrow height multiplier: times the module width gives each row's height in dots; 1 is not recommended≥ 1^BY
finterpretation line: none, above or below; with more than two rows it can run past the right edgeN · A · BN
mstarting mode: 0 regular alphanumeric, 1 multiple read alphanumeric, 2 regular numeric, 3 group alphanumeric, 4/5 alphanumeric shift 1/2, A automatic0–5 · AA

Source

Zebra ZPL II Programming Guide (P1134473-11EN Rev A), page 74. Zebra guide page →

^BY · ^B7 · ^BB · ^FD

ZPL commands list and reference →

Try ZPL in the online viewer