How does dual BarcodeDetector and ZXing decoding scan images locally?
The browser scanner runs native hardware recognition first and falls back smoothly to an in-memory @zxing/library Web Worker across 14 symbologies. Camera feeds, clipboard screenshots, uploaded photos, and PDF pages decode strictly on your device, reading UPC, EAN-13, Code 128, DataMatrix, PDF417, and QR scanner payloads without remote uploads.
When running on browsers implementing the MDN BarcodeDetector Web API documentation, frames route through operating-system vision libraries first for near-instant recognition. On browsers lacking native BarcodeDetector or when skewed contrast foils an initial fast pass, the worker invokes MultiFormatReader with TRY_HARDER hints inside browser memory so recognition remains deterministic across desktop and mobile environments.
To benchmark decoding immediately without digging up printed cartons, click Load sample barcode. That action renders a crisp local sample-gs1-datamatrix.png symbol encoding (01)09501101530003(17)281231(10)LOT42 at scale 5 with 4 quiet-zone modules, whereas teams scanning only restaurant menus or URL stickers can switch to the dedicated camera and image QR code reader.
Scan 14 barcode formats locally in browser, DataMatrix, and PDF417
Supply-chain audits frequently mix legacy retail linear strips with dense 2D logistics squares on the same pallet manifest. Because MultiFormatReader registers 14 formats simultaneously, one scan queue handles UPC and EAN-13 store labels alongside stacked DataMatrix and PDF417 transport tags without switching modes manually.
| Category | Supported symbologies | Typical real-world payload |
|---|---|---|
| Retail 1D | UPC-A, UPC-E, EAN-13, EAN-8 | Consumer product GTINs at retail point of sale |
| Logistics 1D | Code 128, Code 39, Code 93, ITF-14, Codabar | Warehouse case tracking, medical specimen, library IDs |
| GS1 linear & DataBar | GS1 DataBar, GS1-128 | Manufacturer coupons, fresh produce weights, carton tracking |
| Square 2D matrix | QR Code, DataMatrix, Aztec | Micro electronics marks, rail tickets, Wi-Fi and vCard |
| Stacked 2D | PDF417 | US/EU driver licenses, air cargo manifests, ID badges |
GS1 Application Identifiers and SSCC-18 cartons
Warehouse carton labels built under the GS1 Serial Shipping Container Code (SSCC) standard embed invisible FNC1 Group Separator characters (\u001d) between variable fields. Whenever a decoded payload starts with GS1 prefixes or parenthesized codes, the parser splits 10 GS1 Application Identifiers automatically: 00 (SSCC-18 pallet ID, 18 digits), 01 (GTIN-14), 02, 10 (batch/lot), 11, 15, 17 (expiry YYMMDD), 21 (serial), 30, and 37.
Parsing these GS1 segments visually lets operators verify lot dates, item counts, and production timestamps without decoding raw ASCII control characters by hand. When a damaged shipping carton needs replacement artwork from the decoded string, teams can immediately generate fresh vector DataMatrix and GS1-128 labels offline without leaving browser memory.
Inspecting QR payloads without auto-opening URLs
Reading unknown stickers carries phishing risks if scanning utilities blindly launch web links in new tabs. Here, the built-in metadata parser inspects QR payloads safely (Wi-Fi, vCard, VEVENT, mailto, tel, sms, geo, and HTTP/HTTPS) so teams can inspect QR payloads without auto-opening links first. Links carrying @ userinfo tricks, xn-- punycode domains, or bare IP addresses surface clear text cautions beside Copy value.
Scan barcode from PDF documents, webcam streams, and inverted labels
Real warehouse captures rarely arrive centered under studio lighting, so the barcode scanner blends live video polling, multi-pass pixel recovery, and high-DPI PDF rasterization inside one drop target accepting multiple images and PDFs at once. Press Ctrl+V or Cmd+V anywhere on the page to decode clipped screen snips instantly.
Clicking Start camera invokes getUserMedia as documented in the MDN MediaDevices.getUserMedia camera API using facingMode: "environment" so mobile devices pick the rear autofocus lens automatically. Active video feeds scan every 380 ms until Stop camera pauses capture.
Decode vertical and inverted thermal labels cleanly
Alpha-channel PNG screenshots composite over pure white using 8 bits per channel BT.601 luminance weighting (0.299R + 0.587G + 0.114B) inside scanBarcodeRgba so dark ISO 16022 DataMatrix and ISO 15417 Code 128 bars on transparent backgrounds remain sharp. When standard HybridBinarizer recognition fails on noisy warehouse photos, the worker retries GlobalHistogramBinarizer automatically.
If a sideways box flap keeps linear bars perpendicular to horizontal scan lines, the decoder rotates the luminance plane 90 degrees (rotateLum90) and also retries inverted brightness (255 - lum) for white-on-black thermal or laser-etched metal parts.
Rasterizing up to 25 PDF pages at 2x local scale
Carrier portal PDFs often embed compact 150 DPI or 300 DPI labels that become blurry when viewed as thumbnails. Dropping any PDF triggers local pdf.js rendering up to 25 PDF pages per document at 2x zoom (200%) directly onto off-screen memory canvases before decoding each page. Receiving teams cross-checking scanned carton GTINs against incoming shipping files can also inspect matching X12 856 ASN and EDIFACT shipment records offline.
When should you export scanned barcodes to CSV or JSON logs?
Session batch exports pay off whenever receiving clerks log multi-carton pallet audits, verify label test runs, or ingest decoded PDF manifests into warehouse databases. Instead of copying individual barcodes one line at a time, operators export full batch logs once every package clears inspection.
Clicking Export CSV saves scanned-barcodes.csv formatted for spreadsheet reconciliation, whereas Export JSON exports scanned-barcodes.json preserving source filenames, PDF page numbers, raw symbology tags, and parsed GS1/QR metadata structures. Individual entries also keep a one-click Copy value button handy for rapid spot fixes before Clear log resets the session queue cleanly.
When blurry ink or fractional browser scaling breaks retail scans during outbound QA, switch to 1D retail UPC-A and EAN-13 prints without blurry bars before rolling fresh label stock across thermal printers or laser sheets.
Camera lighting tip: Hold phone lenses roughly 15 cm back from glossy thermal labels at a slight angle so overhead warehouse glare avoids washing out white-to-black bar edges.