Plain English

Prints a Code 128 barcode — the most versatile 1D barcode that can encode all 128 ASCII characters. It automatically selects the most efficient subset (A, B, or C). This is the go-to barcode for most modern labelling applications.

When to use

For general-purpose barcodes, shipping labels, inventory, and anywhere you need to encode mixed alphanumeric data.

Syntax

ESC+BGabcdddddata

Parameters

ParameterDescription
aSubset: 0=auto, 1=A, 2=B, 3=C
bCheck digit: 0=none, 1=include
cBar width ratio (1-4)
ddddBarcode height in dots (4 digits)
dataThe data to encode

Example

ESC+A
ESC+H0100
ESC+V0050
ESC+BG020100ABC-12345
ESC+Q1
ESC+Z

Code 128 barcode encoding "ABC-12345" with 100-dot height

Try it in the playground View all SBPL commands