Saltar al contenido

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 visor

Generador

Generando…

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ámetroQué haceValores
^BY wModule width, in dots2 or 3 at 203 dpi
^B7 oOrientaciónN, R, I, B
^B7 hHeight of each row, in dotsfor example 6 to 10
^B7 sSecurity (error correction) level0 to 8
^B7 cData columns1 to 30; empty = the printer chooses
^B7 rRows3 to 90; empty = the printer chooses
^B7 tTruncate the right sideN (standard) or Y (compact)
PDF417 barcode, 240 by 60 dots, encoding OpenZPL PDF417 sample
etiqueta de 4 × 2 in a 203 dpi (8 dpmm) · 812 × 406 px · Abrir en el visor
^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:

SettingsTamaño en puntos
^BY2, ^B7N,6,3,,,N240 × 60
^BY2, 4 columns274 × 48
^BY2, truncated (t = Y)172 × 60
^BY3, ^B7N,10,5,,,N462 × 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

PDF417 barcode, 240 by 60 dots, encoding OpenZPL PDF417 sample
etiqueta de 4 × 2 in a 203 dpi (8 dpmm) · 812 × 406 px · Abrir en el visor
^XA
^BY2
^FO40,40^B7N,6,3,,,N
^FDOpenZPL PDF417 sample^FS
^XZ

^BY3, rows of 10 dots, security 5

The same PDF417 with module width 3, taller rows and security level 5
etiqueta de 4 × 2 in a 203 dpi (8 dpmm) · 812 × 406 px · Abrir en el visor
^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.

Fuentes