PDF417 barcodes in ZPL with ^B7
To print a PDF417 barcode in ZPL, set the module width with ^BY and use ^B7N with the row height and the security level: ^BY2^FO40,40^B7N,6,3,,,N^FDOpenZPL PDF417 sample^FS. PDF417 stacks rows of code words, so it holds much more than a linear barcode in a wide, short block.
Actualizado 2026-10-20 · Renderizados hechos con el motor de OpenZPL
Abrir en el visorGenerador
Etiqueta de 4 × 2 pulgadas a 203 dpi. Una vista previa muestra cómo la impresora dibuja el código; confirme con un escáner antes de imprimir una serie.
The ^B7 command
| Parámetro | Qué hace | Valores |
|---|---|---|
^BY w | Module width, in dots | 2 or 3 at 203 dpi |
^B7 o | Orientación | N, R, I, B |
^B7 h | Height of each row, in dots | for example 6 to 10 |
^B7 s | Security (error correction) level | 0 to 8 |
^B7 c | Data columns | 1 to 30; empty = the printer chooses |
^B7 r | Rows | 3 to 90; empty = the printer chooses |
^B7 t | Truncate the right side | N (standard) or Y (compact) |

^XA ^BY2 ^FO40,40^B7N,6,3,,,N ^FDOpenZPL PDF417 sample^FS ^XZ
Tamaño en puntos
The same 21-character text, rendered by the OpenZPL engine at 203 dpi:
| Settings | Tamaño en puntos |
|---|---|
^BY2, ^B7N,6,3,,,N | 240 × 60 |
^BY2, 4 columns | 274 × 48 |
^BY2, truncated (t = Y) | 172 × 60 |
^BY3, ^B7N,10,5,,,N | 462 × 160 |
More columns make the code wider and shorter; a higher security level adds code words and makes it bigger. Truncated PDF417 saves width but some scanners don't accept it, so prefer the standard form unless space forces you.
^BY2, rows of 6 dots, security 3

^XA ^BY2 ^FO40,40^B7N,6,3,,,N ^FDOpenZPL PDF417 sample^FS ^XZ
^BY3, rows of 10 dots, security 5

^XA ^BY3 ^FO40,40^B7N,10,5,,,N ^FDOpenZPL PDF417 sample^FS ^XZ
Datos válidos e inválidos
- Text and digits of any kind; PDF417 is used on IDs, boarding passes and shipping documents.
- Escape
^and~with^FH, as in every field. - Very long data makes a code taller than the label; raise the column count to keep it short.
Verifique un código de barras antes de imprimir una tanda
Una vista previa muestra cómo la impresora dibujará el código: anchos de barras, zona muerta y la línea legible por humanos. No prueba que cada escáner lo lea en su medio. Imprima una etiqueta a la densidad real y escáneela con el escáner que utiliza su cliente o transportista; para códigos de venta al por menor y logística, un verificador de códigos de barras califica la calidad de impresión.
Preguntas
What is the difference between ^B7 and MicroPDF417?
MicroPDF417 (^BF) is a smaller variant for short data. The OpenZPL engine doesn't draw ^BF yet; see compatibility.
Why is my PDF417 too tall?
Lower the row height (second parameter of ^B7) or set more columns so the data spreads sideways.