Symptom
A Code 128, 2 of 5, EAN, or DataMatrix barcode scans incorrectly even though the displayed source value is right. Or the barcode looks perfect in design preview and fails on the target printer or scanner. Often the trigger for the investigation is a mode-specific map string whose relationship to the data value is not obvious.
Cause
A barcode encodes more than the visible value. Code 128 mode selection, check digits, start and stop characters, quiet zones, module width, print resolution, and output-driver conversion all decide whether the symbol scans.
The map string in particular can carry symbology control values rather than business data. Passing a plain text value through the barcode object can therefore produce a symbol that looks plausible and is semantically wrong, which is the worst combination: nothing fails until a scanner in production reads garbage.
Fix
Before changing any map string, pin down three facts: the exact symbology required, the scanner specification it must satisfy, and the output PDL the job produces.
Then work through the encoding chain:
- Separate business data from symbology control characters in the mapped value.
- Confirm whether Exstream calculates the check digit or expects it already present in the value; getting this wrong in either direction produces unscannable symbols.
- Build a small test set with minimum-length, maximum-length, and special-character values.
- Validate the final artifact (the actual print stream or PDF, at the target resolution) with the production scanner. Preview validation validates nothing.
Keep the barcode object and its map-string logic under version control together with a known-good scan fixture, so a future change can be verified against a reference that is known to work.
Validate each output driver separately
Font substitution and output-driver rasterization can both change barcode output after design time. A symbol that scanned in one output format can fail in another with identical design objects. Record a passing scan for each output driver and target resolution.