@sythos/js_barcode_universal 1.0.0 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +16 -17
  2. package/NOTICE.md +24 -22
  3. package/README.md +137 -60
  4. package/bundle/sythos-barcode.esm.js +3380 -216
  5. package/bundle/sythos-barcode.js +3368 -216
  6. package/examples/create.html +2 -0
  7. package/examples/read.html +341 -341
  8. package/licenses/README.md +58 -29
  9. package/licenses/aztec-code.license +74 -0
  10. package/licenses/codabar.license +9 -9
  11. package/licenses/code-11.license +9 -9
  12. package/licenses/code-128.license +6 -6
  13. package/licenses/code-39.license +6 -6
  14. package/licenses/code-93.license +7 -7
  15. package/licenses/data-matrix.license +11 -11
  16. package/licenses/ean-13.license +6 -6
  17. package/licenses/ean-8.license +6 -6
  18. package/licenses/gs1-128.license +6 -6
  19. package/licenses/isbn.license +7 -7
  20. package/licenses/itf-14.license +6 -6
  21. package/licenses/itf.license +6 -6
  22. package/licenses/micropdf417.license +96 -0
  23. package/licenses/msi-plessey.license +7 -7
  24. package/licenses/pdf417.license +37 -0
  25. package/licenses/pharmacode.license +7 -7
  26. package/licenses/qr-code.license +6 -6
  27. package/licenses/upc-a.license +7 -7
  28. package/licenses/upc-e.license +6 -6
  29. package/package.json +13 -3
  30. package/src/aztec/decoder.js +317 -0
  31. package/src/aztec/detector.js +224 -0
  32. package/src/aztec/encoder.js +257 -0
  33. package/src/aztec/high-level.js +211 -0
  34. package/src/aztec/index.js +45 -0
  35. package/src/aztec/tables.js +210 -0
  36. package/src/core/galois-field.js +3 -0
  37. package/src/core/reed-solomon.js +64 -50
  38. package/src/datamatrix/decoder.js +262 -262
  39. package/src/datamatrix/detector.js +225 -225
  40. package/src/datamatrix/encoder.js +191 -191
  41. package/src/datamatrix/index.js +42 -42
  42. package/src/datamatrix/tables.js +123 -123
  43. package/src/index.js +113 -3
  44. package/src/micropdf417/compaction.js +116 -0
  45. package/src/micropdf417/decoder.js +183 -0
  46. package/src/micropdf417/detector.js +149 -0
  47. package/src/micropdf417/encoder.js +209 -0
  48. package/src/micropdf417/error-correction.js +55 -0
  49. package/src/micropdf417/index.js +49 -0
  50. package/src/micropdf417/tables.js +184 -0
  51. package/src/pdf417/compaction.js +298 -0
  52. package/src/pdf417/decoder.js +75 -0
  53. package/src/pdf417/detector.js +468 -0
  54. package/src/pdf417/encoder.js +91 -0
  55. package/src/pdf417/error-correction.js +47 -0
  56. package/src/pdf417/index.js +6 -0
  57. package/src/pdf417/tables.js +317 -0
package/LICENSE CHANGED
@@ -31,17 +31,18 @@ READ THIS FIRST
31
31
  **Nothing in this appendix applies to, encumbers, or imposes any obligation on
32
32
  the software distributed under the MIT License above.**
33
33
 
34
- This package contains 100% original code, written from scratch. It has ZERO
35
- runtime dependencies. No source code, and no table of values, has been copied
36
- from any other software project, under any license. The distributed artifact is
37
- therefore covered by the MIT License above and by nothing else.
34
+ The implementation and integration work in this package is original work by
35
+ Sythos. It has ZERO runtime dependencies. No third-party barcode source code
36
+ is copied into or shipped by the distributed artifact. Public or normative
37
+ format values may be represented in original Sythos data structures with
38
+ provenance and legal-review status recorded where required.
38
39
 
39
40
  This appendix exists only because barcode symbologies carry a history of
40
41
  specification copyrights, expired patents and live trademarks, and it is useful
41
42
  to have that history inventoried in one place. It is an ENGINEERING INVENTORY,
42
- NOT LEGAL ADVICE. Every row marked "TO VERIFY" is an item the author has not
43
- independently confirmed; do not rely on any of it for a legal decision. If your
44
- use case is commercially sensitive, consult a qualified attorney.
43
+ NOT LEGAL ADVICE. Scoped review labels identify items that need current legal or
44
+ registry confirmation. If your use case is commercially sensitive, consult a
45
+ qualified attorney.
45
46
 
46
47
 
47
48
  1. THE DISTRIBUTED PACKAGE
@@ -53,7 +54,7 @@ use case is commercially sensitive, consult a qualified attorney.
53
54
  Effective license ............... MIT, in full, as stated above
54
55
 
55
56
 
56
- 2. DEVELOPMENT-TIME TOOLS (NOT DISTRIBUTED, NOT LINKED, NEVER READ)
57
+ 2. DEVELOPMENT-TIME TOOLS (NOT DISTRIBUTED OR LINKED)
57
58
  -------------------------------------------------------------------
58
59
 
59
60
  Tool License Role
@@ -64,16 +65,14 @@ use case is commercially sensitive, consult a qualified attorney.
64
65
 
65
66
  THE PROJECT RULE, STATED PRECISELY:
66
67
 
67
- These tools may be INVOKED during testing.
68
- Their SOURCE is never opened, and no line of their code, and no constant
69
- from their tables, ever enters this project's output.
68
+ These tools and public technical materials may be consulted during
69
+ implementation or testing. No third-party barcode source code is copied
70
+ into this project's output.
70
71
 
71
- They are used strictly as black boxes: an input goes in, the OUTPUT that comes
72
- back is compared against ours. Outputs are facts about a published symbology,
73
- not creative expression, so comparing against them creates no derivative work
74
- and no license obligation. This is the standard clean-room technique, and it is
75
- the opposite of source copying — it is how originality is PROVEN rather than
76
- merely asserted.
72
+ Their outputs may be compared against ours as testing evidence. Public or
73
+ normative values are represented in original Sythos structures with provenance
74
+ and legal review where required. None of this is a legal conclusion about
75
+ derivative works or license obligations.
77
76
 
78
77
  typescript (tsc) is not a barcode library and carries no symbology logic at
79
78
  all. It is an optional generator: it reads the JSDoc annotations already
package/NOTICE.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  ## Origin of this code
4
4
 
5
- Every line of JavaScript in this repository is **original work by Sythos**.
6
-
7
- No source code, and no table of constants, has been copied from any other
8
- software project under any license, permissive or otherwise. That covers
9
- every other barcode implementation, without exception.
5
+ The JavaScript implementation and integration work in this repository is
6
+ original work by Sythos. No third-party barcode source code is copied into or
7
+ shipped by this package. Public or normative format values may be represented
8
+ in original Sythos data structures, with provenance and legal-review status
9
+ recorded where required.
10
10
 
11
11
  The symbologies are implemented from **published descriptions of the formats**
12
12
  (which are systems and facts, not works of authorship) and from **constant
@@ -22,24 +22,23 @@ is derivable rather than arbitrary.
22
22
  | Third-party licenses applying to the distributed package | **none** |
23
23
 
24
24
  The `LICENSE` file carries the full MIT text plus an informational appendix
25
- inventorying the specification copyrights, patent history and trademarks that
26
- surround these symbologies. **None of them encumbers this code** the appendix
27
- exists for reference, not because obligations flow from it.
25
+ inventorying specification copyrights, patent history and trademarks that
26
+ surround these symbologies. The appendix is an engineering record, not legal
27
+ advice, and does not resolve obligations in every jurisdiction.
28
28
 
29
29
  ## Where other barcode libraries may and may not appear
30
30
 
31
- The line is drawn at **invoke vs. read**:
31
+ The line is drawn at **invoke vs. incorporate**:
32
32
 
33
33
  | | |
34
34
  |---|---|
35
35
  | Running an independent implementation during **testing**, comparing its output to ours | **allowed** |
36
- | Reading its source, or lifting a constant table from it, into this project | **never** |
36
+ | Copying its source code into this project | **not done** |
37
+ | Consulting public technical material or an implementation during review | allowed with provenance |
37
38
 
38
- Such outputs are facts about a published symbology, not creative expression
39
- comparing against them creates no derivative work. This is how the originality
40
- of the shipped code is *demonstrated*, not compromised: an implementation that
41
- independently agrees with several unrelated ones, byte for byte, is evidently
42
- correct and evidently not a copy of any of them.
39
+ Such outputs are facts about a published symbology. Comparing against them is a
40
+ testing activity; it does not place their code in the distributed package and
41
+ is not a legal conclusion about derivative works.
43
42
 
44
43
  No third-party barcode code is a runtime dependency, and none of it ships in the
45
44
  published package. See `LICENSE` §2.
@@ -69,7 +68,7 @@ worked example exists in the format's public documentation, its intermediate
69
68
  values are checked — not copied code, just the arithmetic any correct
70
69
  implementation must reproduce.
71
70
 
72
- **4. The real world — the decisive test.** `examples/create.html` renders any
71
+ **4. The real world — the decisive test.** `git/examples/create.html` renders any
73
72
  symbol to the screen; a phone camera or a supermarket scanner reads it or does
74
73
  not. This is the strongest oracle available and the one that actually matters,
75
74
  because it tests against the installed base of real scanners rather than
@@ -80,7 +79,8 @@ write.**
80
79
  **5. Differential testing against independent implementations.** Random
81
80
  payloads across every version and ECC level are encoded here and decoded by
82
81
  several unrelated third-party barcode implementations — and vice versa. These
83
- are invoked as black boxes and their source is never read (see above).
82
+ are invoked as black boxes; their source and tables are not shipped by this
83
+ project.
84
84
  Agreement across implementations that share no lineage is strong evidence of
85
85
  correctness; disagreement localises a bug immediately.
86
86
 
@@ -96,11 +96,13 @@ Records any constant table whose values were transcribed from a documented
96
96
  source rather than generated by `tools/`. Each entry names the source and the
97
97
  date of transcription.
98
98
 
99
- *(empty all tables to date are generated by `tools/` or derived from
100
- first principles in the module that uses them)*
99
+ | PDF417 pattern ordering | AIM USS-PDF417 public reference ([reference copy](https://www.expresscorp.com/uploads/specifications/44/USS-PDF-417.pdf)), Appendix H / Table H1, transcribed for `src/pdf417/tables.js`; accessed 2026-08-11. The reference copy is attributed here; its copyright and redistribution terms remain under legal review. |
100
+ | PDF417 black-box verification | ZXing Java 3.5.3 and bwip-js 4.5.1 were invoked as external black boxes on 2026-08-11 for bidirectional Text/Numeric/UTF-8 vectors. Their source and tables are not shipped. |
101
+ | PDF417 device evidence | User-provided 6/6 continuous-camera attestations on Pixel 10/Android 17/Chrome and iPhone 17/Safari, including printed Brother MFC-L2710DW symbols, low light/flash, blur and motion; recorded as user evidence, not independently captured by this repository. |
102
+ | MicroPDF417 technical and provenance review | [ISO/IEC 24728:2006](https://www.iso.org/standard/38838.html), [Wikipedia overview](https://en.wikipedia.org/wiki/MicroPDF417), [US 6,047,892 record](https://patents.google.com/patent/US6047892A/en) and its [direct PDF](https://patentimages.storage.googleapis.com/0a/79/f5/e8d374043414f3/US6047892.pdf) were consulted on 2026-08-11. ZXing-C++, Zint and bwip-js were consulted for implementation/review or black-box validation. No third-party source code is copied or shipped; normative/public values are represented in original Sythos data structures, with provenance and legal review pending. |
101
103
 
102
104
  ## Verification log
103
105
 
104
- Records each `[TO VERIFY]` marker cleared from `LICENSE`, with its citation.
105
-
106
- *(empty)*
106
+ Records the scoped review labels used by the inventory. Current labels include
107
+ `[VERIFIED FACT]`, `[REGISTRY CHECK REQUIRED]`, `[PATENT FAMILY REVIEW REQUIRED]`,
108
+ `[LICENSE TERMS REVIEW REQUIRED]` and `[LEGAL REVIEW]`.
package/README.md CHANGED
@@ -6,7 +6,7 @@ Read and write barcodes in JavaScript.
6
6
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
7
  [![Runtime dependencies: 0](https://img.shields.io/badge/runtime%20dependencies-0-brightgreen.svg)](package.json)
8
8
 
9
- 100% original code, zero runtime dependencies, MIT. It runs unmodified in Node, in browsers
9
+ Original Sythos implementation, zero runtime dependencies, MIT. It runs unmodified in Node, in browsers
10
10
  (including Safari on iOS) and in web workers. The core requires no canvas, no filesystem and no
11
11
  DOM — images go in and come out as plain `{ data, width, height }` RGBA objects, which is exactly
12
12
  what an `ImageData` is.
@@ -90,8 +90,11 @@ const svg = toSVG(encodeQR('https://example.com', { ecc: 'M' }), { scale: 8 });
90
90
  | `@sythos/js_barcode_universal/core` | `BitMatrix`, `GaloisField`, Reed–Solomon, the error classes |
91
91
  | `@sythos/js_barcode_universal/image` | `LuminanceSource`, the binarizers, grid sampling, `PerspectiveTransform` |
92
92
  | `@sythos/js_barcode_universal/oned` | The per-format 1D writers (`encodeEAN13`, `encodeCode128`, …) and `decodeOneD` |
93
- | `@sythos/js_barcode_universal/qr` | `encodeQR`, `decodeQR`, `detectQR`, `detectAndDecodeQR` |
93
+ | `@sythos/js_barcode_universal/qr` | `encodeQR`, `decodeQR`, `detectQR`, `detectAndDecodeQR` |
94
94
  | `@sythos/js_barcode_universal/datamatrix` | `encodeDataMatrix`, `decodeDataMatrix`, `detectDataMatrix`, `detectAndDecodeDataMatrix` |
95
+ | `@sythos/js_barcode_universal/aztec` | `encodeAztec`, `decodeAztec`, `detectAztec`, `detectAndDecodeAztec` |
96
+ | `@sythos/js_barcode_universal/pdf417` | `encodePDF417`, `decodePDF417`, `detectPDF417`, `detectAndDecodePDF417` |
97
+ | `@sythos/js_barcode_universal/micropdf417` | `encodeMicroPDF417`, `decodeMicroPDF417`, `detectMicroPDF417`, `detectAndDecodeMicroPDF417` |
95
98
  | `@sythos/js_barcode_universal/render` | Every renderer plus `isWebGL2Available` / `isWebGPUAvailable` |
96
99
  | `@sythos/js_barcode_universal/render/svg` | `toSVG`, `toSVGDataURI` |
97
100
  | `@sythos/js_barcode_universal/render/png` | `toPNG`, `toPNGDataURI` |
@@ -103,8 +106,8 @@ The `unpkg` and `jsdelivr` fields point at the IIFE bundle, so a CDN needs no in
103
106
 
104
107
  ```html
105
108
  <script src="https://unpkg.com/@sythos/js_barcode_universal"></script>
106
- <script src="https://unpkg.com/@sythos/js_barcode_universal@1.0.0"></script>
107
- <script src="https://cdn.jsdelivr.net/npm/@sythos/js_barcode_universal@1.0.0"></script>
109
+ <script src="https://unpkg.com/@sythos/js_barcode_universal@1.2.5"></script>
110
+ <script src="https://cdn.jsdelivr.net/npm/@sythos/js_barcode_universal@1.2.5"></script>
108
111
  ```
109
112
 
110
113
  Pin the version for anything you ship; the unpinned form resolves to `latest` and will move under
@@ -207,55 +210,119 @@ time.
207
210
  | Code 11 | `code11` | 1D | ✅ | — |
208
211
  | MSI Plessey | `msi` | 1D | ✅ | — |
209
212
  | Pharmacode | `pharmacode` | 1D | ✅ | — |
210
- | QR Code | `qr` | 2D | ✅ | ✅ |
211
- | Data Matrix ECC 200 | `datamatrix` | 2D | ✅ | ✅ |
213
+ | QR Code | `qr` | 2D | ✅ | ✅ |
214
+ | Data Matrix ECC 200 | `datamatrix` | 2D | ✅ | ✅ |
215
+ | Aztec Code | `aztec` | 2D | ✅ | ✅ |
216
+ | PDF417 | `pdf417` | 2D | ✅ | ✅ |
217
+ | MicroPDF417 | `micropdf417` | 2D | ✅ | ✅ |
212
218
 
213
- Seventeen formats, all writable, fourteen readable. **Code 11, MSI Plessey and Pharmacode are
214
- write-only** they encode correctly, but there is no reader for them, and `decode` will never
215
- return one.
219
+ Twenty formats, all writable, seventeen readable. **Code 11, MSI Plessey and Pharmacode remain
220
+ write-only in the generic image pipeline.** PDF417 exposes direct matrix decoding, automatic
221
+ camera localization and an assisted quadrilateral sampler through its subpath. Its detector is
222
+ validated on degraded synthetic photographs and real Pixel 10/Chrome and iPhone 17/Safari camera
223
+ tests; external black-box vectors from ZXing 3.5.3 and bwip-js also pass in both directions.
224
+ Text and Numeric vectors are covered bidirectionally; binary byte-for-byte interop remains
225
+ explicitly unclaimed until a dedicated external byte corpus is added.
216
226
 
217
227
  [^1]: `gs1128`, `itf14` and `isbn` are sub-variants that share a decoder with their base format, so
218
228
  they decode under that base id: a GS1-128 comes back as `code128`, an ITF-14 as `itf`, and an ISBN
219
229
  as `ean13`. The payload is intact either way — a GS1-128 *is* a Code 128 with a leading FNC1, an
220
230
  ITF-14 *is* an ITF fixed at fourteen digits, and an ISBN barcode *is* an EAN-13 with a 978/979
221
231
  prefix. Match on `result.format === 'code128'` rather than `'gs1128'`, or a
222
- condition on the sub-variant id will silently never fire.
232
+ condition on the sub-variant id will silently never fire.
233
+
234
+ ### Data Matrix ECC 200
235
+
236
+ `datamatrix` writes and reads the 30 classic ECC 200 square and rectangular symbol sizes. The
237
+ encoder supports ASCII compaction (including numeric pairs), Base256 binary payloads, automatic
238
+ or forced square/rectangular shape, Reed–Solomon error correction and GS1 FNC1 in the first
239
+ position. DMRE is not included.
240
+
241
+ ```js
242
+ import { encodeDataMatrix, decodeDataMatrix } from '@sythos/js_barcode_universal/datamatrix';
243
+
244
+ const symbol = encodeDataMatrix('0101234567890128', { gs1: true, shape: 'square' });
245
+ const result = decodeDataMatrix(symbol);
246
+ console.log(result.text, result.gs1); // 0101234567890128 true
247
+ ```
248
+
249
+ Binary content is accepted as a `Uint8Array` with `encoding: 'base256'`. The current high-level
250
+ decoder handles ASCII and Base256 codewords; C40, Text, X12 and EDIFACT input symbols are not yet
251
+ decoded. The current detector accepts axis-aligned square or rectangular symbols; the normal
252
+ `decode(image, { formats: ['datamatrix'] })` pipeline also retries quarter-turn rotations.
253
+ Arbitrary-angle and perspective-skewed Data Matrix photographs are not yet guaranteed.
254
+
255
+ ### Aztec Code
256
+
257
+ `aztec` writes Compact layers 1–4 and Full layers 1–32, selecting a fitting symbol automatically
258
+ unless `layers` and `compact` are forced. It supports the five Aztec text tables and UTF-8 byte
259
+ payloads through Binary Shift, with `eccPercent` (default 23) controlling the requested
260
+ error-correction level.
261
+ ECI is not yet a configurable public option.
262
+
263
+ ```js
264
+ import { encodeAztec, decodeAztec } from '@sythos/js_barcode_universal/aztec';
265
+
266
+ const symbol = encodeAztec('Greetings My Lord Sythos 👋', { eccPercent: 23 });
267
+ const result = decodeAztec(symbol);
268
+ console.log(result.text); // Greetings My Lord Sythos 👋
269
+ ```
270
+
271
+ The image detector handles rotation, inverted polarity and quadrilateral sampling around the
272
+ central bull’s-eye. Severe photographic perspective remains an interoperability and robustness
273
+ gate rather than a guaranteed capability.
274
+
275
+ ### PDF417 (writer, matrix decoder and camera reader)
276
+
277
+ `pdf417` supports PDF417 Text, Byte and Numeric compaction, ECI 3 (ISO-8859-1) and ECI 26
278
+ (UTF-8), ECC levels 0–8, row-height inference and Reed–Solomon erasure correction. The direct
279
+ matrix decoder is available from `@sythos/js_barcode_universal/pdf417`.
280
+
281
+ The image helper handles clean module-aligned raster symbols, integer scale, right-angle
282
+ rotations, automatic perspective estimation, mild blur/noise and an application-supplied
283
+ quadrilateral. Results expose `bytes` and ordered `segments` for byte-preserving payloads. Real
284
+ device validation covers Pixel 10/Chrome and iPhone 17/Safari with printed symbols and continuous
285
+ camera capture. Extreme glare, severe occlusion, curved media and multi-symbol scenes remain
286
+ outside the validated robustness envelope.
287
+
288
+ ```js
289
+ import { encodePDF417, decodePDF417 } from '@sythos/js_barcode_universal/pdf417';
290
+
291
+ const symbol = encodePDF417('AAMVA SAMPLE', { eccLevel: 3 });
292
+ console.log(decodePDF417(symbol).text);
293
+ ```
223
294
 
224
- ### Data Matrix ECC 200
295
+ ### MicroPDF417
225
296
 
226
- `datamatrix` writes and reads the 30 classic ECC 200 square and rectangular symbol sizes. The
227
- encoder supports ASCII compaction (including numeric pairs), Base256 binary payloads, automatic
228
- or forced square/rectangular shape, Reed–Solomon error correction and GS1 FNC1 in the first
229
- position. DMRE is not included.
297
+ `micropdf417` writes and reads the 34 fixed MicroPDF417 variants. It supports Text, Byte and
298
+ Numeric compaction, plus Byte-compaction ECI 3 (ISO-8859-1) and 26 (UTF-8). `columns`,
299
+ `rowHeight` and `aspectRatio` let callers constrain automatic variant selection.
230
300
 
231
301
  ```js
232
- import { encodeDataMatrix, decodeDataMatrix } from '@sythos/js_barcode_universal/datamatrix';
302
+ import { encodeMicroPDF417, decodeMicroPDF417 } from '@sythos/js_barcode_universal/micropdf417';
233
303
 
234
- const symbol = encodeDataMatrix('0101234567890128', { gs1: true, shape: 'square' });
235
- const result = decodeDataMatrix(symbol);
236
- console.log(result.text, result.gs1); // 0101234567890128 true
304
+ const symbol = encodeMicroPDF417('MICRO PDF417', { compaction: 'text' });
305
+ console.log(decodeMicroPDF417(symbol).text);
237
306
  ```
238
307
 
239
- Binary content is accepted as a `Uint8Array` with `encoding: 'base256'`. The current high-level
240
- decoder handles ASCII and Base256 codewords; C40, Text, X12 and EDIFACT input symbols are not yet
241
- decoded. The current detector accepts axis-aligned square or rectangular symbols; the normal
242
- `decode(image, { formats: ['datamatrix'] })` pipeline also retries quarter-turn rotations.
243
- Arbitrary-angle and perspective-skewed Data Matrix photographs are not yet guaranteed.
308
+ The detector accepts clean, integer-scaled raster symbols and quarter-turn rotations. Arbitrary
309
+ perspective, severe photographic degradation and multi-symbol scenes are not yet claimed as
310
+ robust capabilities.
244
311
 
245
312
  ### Not implemented
246
313
 
247
- **PDF417, Aztec, GS1 DataBar and MaxiCode are not implemented** — neither writing
248
- nor reading. Data Matrix ECC 200 is implemented for its classic square and rectangular symbols;
249
- DMRE remains outside the current scope. Some scaffolding for the remaining formats exists in the core (the Galois field code already handles
250
- the prime field PDF417 needs), but none of those remaining symbologies is usable today. See [`PLAN.md`](PLAN.md)
251
- for where they sit.
314
+ **GS1 DataBar and MaxiCode are not implemented** — neither writing nor reading. Data Matrix ECC
315
+ 200 is implemented for its classic square and rectangular symbols;
316
+ DMRE remains outside the current scope. See [`PLAN.md`](PLAN.md) for the remaining symbologies.
252
317
 
253
318
  ---
254
319
 
255
320
  ## Live examples
256
321
 
257
322
  Two self-contained pages, each loading the IIFE bundle with a plain `<script>` tag. **Both open
258
- directly from disk** — double-click the file, no server and no build.
323
+ directly from disk** — double-click the file, no server and no build. This `examples/` directory is
324
+ the single canonical source; the development workspace references these files instead of keeping
325
+ a second copy.
259
326
 
260
327
  ### [`examples/create.html`](examples/create.html)
261
328
 
@@ -289,15 +356,21 @@ hatch.
289
356
  encode(text, options?) → BitMatrix
290
357
  ```
291
358
 
292
- `options`: `format` (default `'qr'`), `ecc` (`'L'|'M'|'Q'|'H'`), `version` (QR 1–40, auto if
293
- omitted), `checkDigit`, `fullAscii` (Code 39 extended), `gs1` (emit a leading FNC1). Data Matrix
294
- ECC 200 accepts `shape: 'any' | 'square' | 'rectangular'` and `encoding: 'ascii' | 'base256'`.
359
+ `options`: `format` (default `'qr'`), `ecc` (`'L'|'M'|'Q'|'H'`), `version` (QR 1–40, auto if
360
+ omitted), `checkDigit`, `fullAscii` (Code 39 extended), `gs1` (emit a leading FNC1). Data Matrix
361
+ ECC 200 accepts `shape: 'any' | 'square' | 'rectangular'` and `encoding: 'ascii' | 'base256'`.
362
+ Aztec accepts `layers`, `compact` and `eccPercent`; it transports UTF-8 byte payloads through
363
+ Binary Shift, and it does not expose configurable ECI yet.
364
+ MicroPDF417 accepts `compaction: 'auto' | 'text' | 'byte' | 'numeric'`, ECI 3 or 26 for Byte
365
+ compaction, and optional `columns`, `rowHeight` and `aspectRatio` constraints.
295
366
 
296
367
  ```js
297
368
  encode('5901234123457', { format: 'ean13' })
298
369
  encode('ABC-123', { format: 'code39', fullAscii: true, checkDigit: true })
299
- encode('https://example.com', { format: 'qr', ecc: 'H', version: 7 })
300
- encode('0101234567890128', { format: 'datamatrix', gs1: true })
370
+ encode('https://example.com', { format: 'qr', ecc: 'H', version: 7 })
371
+ encode('0101234567890128', { format: 'datamatrix', gs1: true })
372
+ encode('Greetings My Lord Sythos 👋', { format: 'aztec', eccPercent: 23 })
373
+ encode('MICRO PDF417', { format: 'micropdf417', compaction: 'text' })
301
374
  ```
302
375
 
303
376
  ```js
@@ -379,12 +452,12 @@ margin ends up uniform on all four sides.
379
452
  RGBA bytes → luminance → binarize → detect → sample → error-correct → decode
380
453
  ```
381
454
 
382
- Luminance conversion flattens the image to greyscale. Binarization turns that into a `BitMatrix`,
383
- either globally or with a hybrid local threshold that survives uneven lighting. Detection locates
384
- a symbol and its corners in that bit plane. Detectors that recover four perspective-aware corners
385
- (currently QR) sample the symbol back through a perspective transform. Data Matrix currently uses
386
- an axis-aligned bounding box plus quarter-turn retries. Error correction repairs what the camera
387
- lost. Only then is the payload decoded.
455
+ Luminance conversion flattens the image to greyscale. Binarization turns that into a `BitMatrix`,
456
+ either globally or with a hybrid local threshold that survives uneven lighting. Detection locates
457
+ a symbol and its corners in that bit plane. Detectors that recover four perspective-aware corners
458
+ (currently QR) sample the symbol back through a perspective transform. Data Matrix currently uses
459
+ an axis-aligned bounding box plus quarter-turn retries. Error correction repairs what the camera
460
+ lost. Only then is the payload decoded.
388
461
 
389
462
  **Reed–Solomon is generic over the finite field.** The `GaloisField` class is constructed with a
390
463
  field order and a primitive polynomial rather than hard-coding GF(256), which is what lets one
@@ -428,35 +501,39 @@ and reports which backend actually drew.
428
501
 
429
502
  MIT © 2026 Sythos. Every source file carries the header.
430
503
 
431
- **The code is 100% original.** No source code and no constant table from any other barcode
432
- implementation is present, under any licence, permissive or otherwise. The symbologies are
433
- implemented from published descriptions of the formats which are systems and facts, not works of
434
- authorship and from constant tables generated by this project's own scripts wherever a table is
435
- derivable rather than arbitrary. There is consequently no upstream licence to carry and no
436
- co-author to credit.
437
-
438
- **Trademark is not licence.** QR Code® is a registered trademark of DENSO WAVE; Aztec Code,
439
- MaxiCode and GS1 DataBar are likewise marks of their owners. A trademark does not restrict
440
- implementing a symbology, but it does constrain branding — which is why this package is named
441
- descriptively rather than after any mark.
442
-
504
+ **The implementation is original Sythos work.** No third-party barcode source code is copied into
505
+ or shipped by this package. The symbologies are implemented from published descriptions of the
506
+ formats and from original Sythos data structures; MicroPDF417 normative/public values carry
507
+ provenance and pending legal review in `NOTICE.md`. The distributed package has no runtime
508
+ third-party licence or co-author attribution.
509
+
510
+ **Trademark is not licence.** QR Code® is a registered trademark of DENSO WAVE; Aztec Code,
511
+ MaxiCode and GS1 DataBar are likewise marks of their owners. A trademark does not restrict
512
+ implementing a symbology, but it does constrain branding which is why this package is named
513
+ descriptively rather than after any mark.
514
+
443
515
  Data Matrix ECC 200 is governed by ISO/IEC 16022:2024; GS1 DataMatrix additionally uses the GS1
444
516
  General Specifications and a leading FNC1. Its engineering provenance, patent and trademark
445
517
  research notes are recorded in [`licenses/data-matrix.license`](licenses/data-matrix.license),
446
- with unresolved claims kept explicitly marked `[TO VERIFY]`.
518
+ with unresolved claims kept explicitly marked using scoped review labels.
519
+
520
+ PDF417 and MicroPDF417 provenance and legal review notes are recorded in
521
+ [`licenses/pdf417.license`](licenses/pdf417.license),
522
+ [`licenses/micropdf417.license`](licenses/micropdf417.license) and the attribution log in
523
+ [`NOTICE.md`](NOTICE.md).
447
524
 
448
525
  [`LICENSE`](LICENSE) carries the full MIT text plus an informational appendix inventorying the
449
526
  specification copyrights, patent history and trademarks that surround these symbologies. None of
450
- them encumbers this code; the appendix is an engineering inventory, not legal advice.
527
+ them is resolved by this file; the appendix is an engineering inventory, not legal advice.
451
528
  [`NOTICE.md`](NOTICE.md) records the origin of the code and how its correctness is verified.
452
529
 
453
530
  ---
454
531
 
455
- ## Contributing and roadmap
456
-
457
- [`PLAN.md`](PLAN.md) is the live status document: what is shipped, what is next, and the ground
458
- rules — chief among them that no code or constant table from any other barcode implementation
459
- enters this project, which is what keeps the licence clean.
532
+ ## Contributing and roadmap
533
+
534
+ [`PLAN.md`](PLAN.md) is the live status document: what is shipped, what is next, and the ground
535
+ rules — chief among them that no third-party source code is copied into or shipped by this
536
+ project, while public or normative values remain provenance-tracked and subject to legal review.
460
537
 
461
538
  Issues and pull requests are welcome at
462
539
  [Sythos/JS_Barcode_Universal](https://github.com/Sythos/JS_Barcode_Universal). A patch that adds a