VALIDPDF417

Error correction

Levels 0–8, what each one buys, and the level to pick for the surface you are printing on.

What the level buys

PDF417 error correction is Reed–Solomon codewords appended to the data. Level n adds 2(n+1) codewords. Higher levels survive more damage and cost more symbol area, because the codewords occupy rows.

LevelCodewordsRecoverable damageTypical use
02~0%Clean laser, controlled humidity
14~3%Digital display only
28~7%Thermal paper
316~11%Thermal paper, humid environment
432~15%Unlaminated card stock
564~20%Card stock, default
6128~25%Laminated, high wear
7256~30%Laminated, long circulation
8512~35%Maximum, wide labels only

Decision table by substrate

SubstrateRecommended ECWidth costFailure mode if too lowFailure mode if too high
Card stock, unlaminated 4 +32 codewords over level 0 Head dropout on the first print run exceeds recovery Symbol grows rows and overruns the label height
Card stock, standard laminate 5 +64 codewords, roughly 3 to 5 extra rows Edge wear after a year of use becomes unrecoverable A fixed-height label clips the stop pattern
Laminated, high wear 6 +128 codewords, roughly 6 to 9 extra rows Laminate cracking kills a row that the budget cannot rebuild Column count falls, module density rises, scanner resolution becomes the limit
Thermal paper 2 +8 codewords, minimal height change Fading at the paper edge loses a row indicator Wider symbol needs more energy per row and fades faster
Screen display 1 or 2 +4 or +8 codewords Compression artefacts from image resizing Brightness scaling softens module edges before EC helps
Rule Pick the lowest level that survives your worst-case substrate. Then decode ten samples off the actual printer before the batch.

Why not always 8

Codewords consume rows. A fixed 2-inch label has a hard row ceiling; pushing to level 8 on a long payload overflows it and the encoder either reduces columns or fails outright. Level 5 is the balance point for a standard DL payload on card stock. On a landscape label, raise columns before raising EC.

Damage classes

  • Dropout — missing modules from a clogged head. Reed–Solomon handles this until the codeword budget runs out.
  • Smear — directional blur from a dragging ribbon. Costs more than equivalent dropout because it corrupts adjacent modules.
  • Overlaminate bubbles — refraction, not data loss. No EC level fixes it; fix the laminator.
  • Cropping — the label template removed the stop pattern. No EC level fixes this either.

Interaction with columns

Columns and EC level trade against each other. More columns means a wider, shorter symbol; more EC means a taller one. The API accepts both per request, so a label that is short and wide should raise columns and keep EC at 5, and a label with spare height should leave the derived column count alone and raise EC to 6.

Checking the result

The EC level is recorded in the row indicators, so a decode confirms what was written. If a symbol decodes at a lower level than requested, the encoder fell back to fit the row budget. Compare the decoded payload with the source before printing, and read troubleshooting for the physical failures that correction cannot cover.

Generate barcode now