^BR - GS1 DataBar Bar Code
The GS1 DataBar (formerly RSS) family, including the composite variants that stack a 2D component above a linear one.
^BR prints a member of the GS1 DataBar family — Reduced Space Symbology when
the guide was written. The family exists for identification where a full EAN or
GS1-128 symbol does not fit: loose produce, small healthcare items, coupons. One
argument chooses between twelve variants. The last two are composites that stack
a 2D component above a linear one, so the symbol can carry a batch or an expiry
date beside the GTIN.
Syntax
^BRo,t,m,s,h,wSupport
Every documented parameter renders the same output Labelary produces.
All twelve symbology types render, and every one of them takes the 2D composite component a | in the field data introduces. Type 8, UPC-E, is reported rather than drawn, which is parity: Labelary draws no UPC-E for any payload. — not pinned by a test
Labelary renders this command. Scheduled for milestone 5.6.
Parameters
oBar code orientationoptional · one of a setRotation of the symbol and interpretation line.
- Default
- the orientation set by
^FW, which itself defaults toN - Invalid value
- discarded, and the default applies. The renderer reports an unrecognized character as invalid, and uses the default.
- Test coverage
- No documented value is exercised by a test (N, R, I, B). The invalid-value rule is not pinned by a test.
N- No rotation (default)
R- Rotated 90° clockwise
I- Rotated 180°. The symbol reads upside down
B- Rotated 270° clockwise
tDataBar typeoptional · integerWhich linear host to render. Types 1 to 6 are the GS1 DataBar family, 7 to 10 the retail symbologies, and 11 and 12 GS1-128 with a CC-A/CC-B or a CC-C composite component. Every type takes a composite component, not only 11 and 12.
- Default
- 1
- Invalid value
- discarded, and the default applies. An out-of-range type resets to the default of 1. No measurement covers Labelary outside the range.
- Test coverage
- Bounds pinned: below the minimum (0), above the maximum (99). Values exercised: 2, 3, 4, 6, 7, 9, 10, 11. Not exercised: 1, 5, 8, 12. The invalid-value rule is pinned by 2 tests.
1- GS1 DataBar Omnidirectional (default)
2- GS1 DataBar Truncated
3- GS1 DataBar Stacked
4- GS1 DataBar Stacked Omnidirectional
5- GS1 DataBar Limited
6- GS1 DataBar Expanded. The whole field data is one GS1 element string that nothing parses. Parentheses around an application identifier encode as data, and a
[reports an invalid character. 7- UPC-A
8- UPC-E
9- EAN-13
10- EAN-8
11- GS1-128 with CC-A or CC-B
12- GS1-128 with CC-C
mMagnificationoptional · integerModule size in dots.
- Default
- a value chosen from the print density
- Accepted range
- 1 to 10
- Invalid value
- clamped to the nearest allowed value. A magnification below 1 falls back to the default. Above 10 it clamps to 10.
- Test coverage
- Bounds pinned: below the minimum (0), above the maximum (11). No test at the minimum or maximum. The invalid-value rule is not pinned by a test.
sSeparator heightoptional · integerHeight of every separator pattern in the symbol: the one between the linear and 2D components of a composite, and the ones between the rows of a stacked DataBar.
- Default
- 1
- Accepted range
- 1 to 2 modules
- Invalid value
- discarded, and the default applies. An out-of-range value resets to the default of 1.
- Test coverage
- Bounds pinned: below the minimum (0). No test at the minimum or maximum. The invalid-value rule is not pinned by a test.
hBar code heightoptional · integerHeight of a GS1-128 host, read as a module count rather than as dots. No other host reads it: every DataBar and retail host has a height its own symbology fixes.
- Default
- 25
- Accepted range
- 1 to 32000 modules
- Invalid value
- clamped to the nearest allowed value. A height of zero prints one module.
- Test coverage
- Bounds pinned: above the maximum (33000). No test at the minimum or maximum. The invalid-value rule is not pinned by a test.
wSegment widthoptional · integerSegment width for GS1 DataBar Expanded Stacked Omnidirectional, a variant of type 6. The renderer ignores it for other types.
- Default
- no segmentation
- Accepted range
- 2 to 20 modules
- Invalid value
- discarded, and the default applies. An out-of-range width is ignored, and no segmentation applies.
- Test coverage
- Bounds pinned: below the minimum (0). No test at the minimum or maximum. The invalid-value rule is pinned by 1 test.
Behavior
The type argument spans three families. Types 1 to 6 are the DataBar symbologies proper, 7 to 10 the ordinary UPC and EAN symbols, and 11 and 12 GS1-128 with a CC-A/CC-B or a CC-C component.
Any type carries a composite component. A vertical bar in the field data
separates the two halves, the linear host first, as in
^FD12345678901|17040401. Without the bar the field draws the host alone.
The magnification argument sets the module width; ^BY reaches no pixel. Only a
GS1-128 host reads the height argument, and it reads it in modules, not dots.
Every other host has a height its own symbology fixes. The separator height sets
every separator row: the one under a composite component, and the ones inside a
stacked DataBar. The segment width applies to type 6 only.
The retail hosts print no digits and grow no guard-bar descenders, unlike the
same symbologies under ^BU, ^BE and ^B8. Each reads a character that is not
a digit as a zero, then right-aligns: eleven digits for UPC-A, twelve for EAN-13,
the rightmost seven for EAN-8. A GS1-128 host encodes its data verbatim behind
one FNC1.
^BR is one of the ten mnemonics whose two prefixes have unrelated meanings.
~BR is not a bar code. It is a Labelary extension that draws a background
rectangle.
Known issues
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- The guide gives the orientation default as
R, uniquely among the bar code commands. Labelary documents the usual^FWdefault instead, and the renderer follows Labelary. — pinned bytest_br_default_parameters - The guide gives the segment width as 2 to 22, even numbers only, with a default of 22. Labelary documents 2 to 20 with no default. The renderer follows Labelary. — pinned by
test_br_out_of_range_segment_width_is_ignored,test_br_segment_width_out_of_range_is_ignored
Example
An omnidirectional DataBar carrying a GTIN, and the type 11 composite carrying the same GTIN with attribute data above it:
^XA
^BY3
^FO50,50^BRN,1,4,1,60^FD12345678901^FS
^FO50,200^BRN,11,4,1,60^FD12345678901|this is composite info^FS
^XZ
Related commands
^BCCode 128 Bar CodeThe most common symbology for shipping and GS1 application identifiers, with four data-encoding modes.^BEEAN-13 Bar CodeThirteen-digit retail symbology, the international form of UPC-A.^BUUPC-A Bar CodeTwelve-digit retail symbology used in North America.^FDField DataSupplies the text or barcode content of the field.
^BQ - QR Code Bar Code
The common two-dimensional matrix symbology. Its error correction and input mode are set by a prefix on the field data, not by the command.
^BS - UPC/EAN Extension
The two- or five-digit add-on printed beside a UPC or EAN symbol, used for periodical issue numbers and suggested prices.