^B7 PDF417 Bar Code
Prints a PDF417 symbol, a two-dimensional stacked code of three to 90 rows, from the data of the next field.
^B7o,h,s,c,r,t
^B7 parameters
| Parameter | Meaning | Accepted values | Default |
|---|---|---|---|
oorientationp. 79 |
Direction in which the symbol is rotated. |
|
The current |
hbar code height for individual rows (in dots)p. 79 |
Height of each row of the symbol. The guide says this number multiplied by the module gives the row height in dots. If it is not given, the overall height defined with^BY divided by the number of rows gives the row height.
|
From 1 up to the height of the label. The guide says 1 is not a recommended value. |
The height set by |
ssecurity levelp. 79 |
How many error-detection and error-correction code words are generated; higher levels add error correction and make the symbol larger. The default of 0 lies outside the 1 to 8 range printed for the parameter; the guide describes it as the level that provides error detection only. |
1 to 8 (error detection and correction). |
0Error detection only, without correction. |
cnumber of data columns to encodep. 79 |
Number of code-word columns, which controls the width of the symbol. |
|
A row-to-column aspect ratio of 1:2. |
rnumber of rows to encodep. 80 |
Number of symbol rows, which controls the height of the symbol. The guide's example is that with no rows or columns entered, 72 code words are put into a symbol of six columns and 12 rows, and it adds that the aspect ratio is not always exact, depending on the code words. |
|
A row-to-column aspect ratio of 1:2. |
ttruncate right row indicators and stop patternpp. 80, 82 |
Whether the right row indicators and the stop pattern are cut down to a single module-wide bar. The guide says truncation can be used where label damage is not likely. |
|
N
|
^B7 notes and gotchas
-
Gotcha
If columns and rows are both given, the guide says their product must be less than 928 and that no symbol prints if it is greater than 928. No symbol prints either if the total number of code words is greater than the product of columns and rows.
p. 81 -
Gotcha
Serialization is not allowed with this barcode.
p. 82 -
Interaction
Structured append lets longer data be printed as several symbols with
pp. 79, 197^FM, which sets where each symbol goes.^FMapplies only to^B7and^BFand is ignored with other commands. -
Interaction
Effects of
p. 82^BYon^B7: module width 2 to 10 (default 2); ratio fixed at 3 and without effect; height 1 to 32000 (default 10), used only when the row height is not given in the h parameter of^B7. -
Interaction
Field data is limited by
pp. 190, 193^FDto 3072 bytes and cannot contain the command prefix characters ^ and ~ directly;^FHcan be used for characters by hexadecimal value. -
Note
The symbol has three to 90 stacked rows. Each row has start and stop patterns and code words, and at least three code words per row are required. The print ratio is fixed.
pp. 79, 1587 -
Note
Field data is limited to 3K of character data. The guide says PDF417 can encode over 1,000 characters per symbol.
p. 79 -
Note
The field data may use the full ASCII set except characters with a special meaning to the printer. The sequence \& stands for a carriage return and line feed, and \\ stands for a backslash.
pp. 82, 190^CI13must be selected to print a backslash. -
Guide issue
The product of columns and rows is said to have to be less than 928, yet the next statement says no symbol prints only when it is greater than 928. The guide does not say what happens when the product is exactly 928.
p. 81 -
Guide issue
The security level is listed as 1 to 8 but has the default 0. For
pp. 79, 82, 148^BY, the module width here is given as 2 to 10, while the^BYentry gives 1 to 10.
^B7 example
^XA ^BY2 ^FO40,40^B7N,6,3^FDPART 4471 LOT 12^FS ^XZ
A PDF417 symbol with a 2-dot module width from ^BY, not rotated, with a row height value of 6 and security level 3. Columns and rows are left out, so the printer chooses the symbol shape, and the data holds ordinary text with no prefix characters.
Guides that use ^B7
BarcoderX is a .NET SDK for thermal labels and barcodes. See the barcode types it covers.
Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 79 to 82, 146, 148, 190, 193, 197, 208, 1587.
Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.
ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.