zplCore.comzplCore.com

18Scan-proof: every barcode read back

Answers "does this barcode carry the data I send, and is the symbol well formed?" before printing. ZplScanProof.Verify renders the label, reads every barcode back from the bitmap with two independent decoders (zxing-cpp and ZXing.Net) and compares it with the field data after ^FH, ^FN, ^SN, check digits and invocation codes – GS1 element by element.

Try it online on zplCloud.com: Barcode Scan-Proof

More on zplCloud.com: Guide: Why your ZPL barcode does not scan

A digital pre-check modelled on ISO/IEC 15415/15416 – not an ISO-conformant verification. The A–F grade is computed from the rendered image; print physics (darkness, speed, media, printhead wear) are not modelled and need a calibrated verifier on the printed label.
var report = ZplScanProof.Verify(zpl, new ScanProofOptions { Dpi = 203, Robustness = true });
foreach (var s in report.Symbols)  // ^BC GS1-128 Match A "00376104250021234569" X = 0.501 mm
    Console.WriteLine($"{s.Command} {s.Symbology} {s.Status} {s.Grade} \"{s.DecodedData}\" X = {s.XDimensionMm:0.###} mm");
Console.WriteLine(report.LowestGrade);          // lowest digital grade of all symbols
string sarif = report.ToSarif("labels/shipping.zpl"), text = report.ToText();
ZplScanProof.Verify(new ZplCore.Barcodes.Barcode { Symbology = ZplCore.Barcodes.Symbology.Ean13, Code = "950600013435" });
zplcore verify pallet.zpl --dpi 203 [--robustness] [--format text|json|sarif] [--fail-on mismatch,grade:C]

[0.1] ^BC GS1-128 line 17 at 94,800 (624×260 dots, 0°)
  status: Match   digital grade: A (4.0)
  field data: "(00)376104250021234569"
  decoded:    "00376104250021234569"
    zxing-cpp: read
    ZXing.Net: read
  X-dimension: 4 dots = 0.501 mm
  quiet zones: left ≥14X (min. 10X), right ≥14X (min. 10X)

Status per symbol

  • Match – decoded = expected = field data
  • DataAltered – decoded = expected, but the symbology changed the data (e.g. a wrong check digit replaced)
  • Mismatch – a decoder reads different data
  • NotDecoded / NotDecodable – unreadable, or no decoder for the symbology (structural checks only)
  • NotRendered – the field printed nothing

Measured

  • X-dimension in dots and mm, whole modules, wide:narrow ratio
  • Quiet zones (limited by other ink or the label edge), bar height, clipping, overlap
  • Interpretation line and nearby text against the data
  • Robustness = true: additional simulations (e.g. target resolution 203 dpi)
  • SARIF 2.1.0 with rule ids SP…, like zplcore comply

Limits: digital only; barcodes inside ^GF graphics are not recognised as barcodes (use ZplScanProof.Verify(Barcode)); no EPL. When the native zxing-cpp library cannot be loaded (glibc older than 2.38 such as Debian 12, or musl/Alpine), scan-proof runs with ZXing.Net only and reports SP1004.