@qrcommunication/gigapdf-lib 0.58.2 → 0.59.0
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.
- package/CHANGELOG.md +63 -0
- package/gigapdf.wasm +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,69 @@ All notable changes to `@qrcommunication/gigapdf-lib` are documented here.
|
|
|
4
4
|
The format follows [Keep a Changelog](https://keepachangelog.com/) and the
|
|
5
5
|
project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.59.0] - 2026-06-21
|
|
8
|
+
|
|
9
|
+
### Added — Universal font decoding (text extraction matches Adobe, zero OCR)
|
|
10
|
+
|
|
11
|
+
A per-font `code → Unicode` resolver, built once at font setup via the full
|
|
12
|
+
ISO 32000 §9.10 priority chain, now covers the real-world font matrix that made
|
|
13
|
+
`textElements()`/`structuredText()` emit `�` or dingbats before:
|
|
14
|
+
|
|
15
|
+
- **Standard Macintosh Glyph Ordering** — `/gNN` glyph names (in `/Differences`
|
|
16
|
+
and via CID GID) resolve through the 258 standard Mac glyph names
|
|
17
|
+
(`g49`→`N`, `g106`→`agrave`→`à`). This is how Adobe reads subset fonts that
|
|
18
|
+
**MuPDF and poppler drop** to `�`.
|
|
19
|
+
- **Type1C (CFF) simple fonts** without `/ToUnicode` — fall back on the embedded
|
|
20
|
+
**CFF charset** (`code → gid → SID → name → Unicode`), recovering accents
|
|
21
|
+
(`à/è/ê/ç`) that were `�`.
|
|
22
|
+
- **AGL ligature names** `f_l`→`fl`, `f_i`→`fi`, `f_f_i`→`ffi` (recursive).
|
|
23
|
+
- **`/ToUnicode` CMap** (bfchar/bfrange, UTF-16BE, multi-char), **CID cmap/post**,
|
|
24
|
+
**named/embedded CMaps**, base encodings (WinAnsi/MacRoman/Standard), digit
|
|
25
|
+
names. Unmapped codes emit **nothing** (like Adobe), never an invented letter
|
|
26
|
+
or a control char.
|
|
27
|
+
|
|
28
|
+
### Added — Coloured text extraction via named colour spaces
|
|
29
|
+
|
|
30
|
+
`textElements()` now resolves `/Separation`, `/ICCBased`, `/Indexed`, `/DeviceN`
|
|
31
|
+
fill colours (running the tint transform) for text, reusing the rasteriser's
|
|
32
|
+
`NamedColorResolver`. Text painted via `cs`/`sc`/`scn` is no longer reported as
|
|
33
|
+
black `[0,0,0]`.
|
|
34
|
+
|
|
35
|
+
### Added — Right-to-left (Hebrew/Arabic) logical order
|
|
36
|
+
|
|
37
|
+
RTL runs extracted in visual order are reordered to logical Unicode order
|
|
38
|
+
(`direction:"rtl"`), guarded against double-reversal via Hebrew final-form
|
|
39
|
+
position. `"רצואה / לארשי תנידמ"` → `"מדינת ישראל / האוצר"`.
|
|
40
|
+
|
|
41
|
+
### Fixed — AcroForm text-field appearance (`/AP`)
|
|
42
|
+
|
|
43
|
+
`setTextField()`/`setChoice()` now regenerate the widget's `/AP /N` appearance
|
|
44
|
+
stream (iterating `/Kids` widgets), honouring `/DA` (font size + colour) and
|
|
45
|
+
`/Q` quadding, so filled values render natively and in Adobe.
|
|
46
|
+
|
|
47
|
+
### Fixed — Split-word run joining
|
|
48
|
+
|
|
49
|
+
Adjacent runs on a line are joined unless separated by a real horizontal gap
|
|
50
|
+
(`"N om et adresse"` → `"Nom et adresse"`, `"ENFANT S"` → `"ENFANTS"`).
|
|
51
|
+
|
|
52
|
+
## [0.58.3] - 2026-06-21
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- **Text extraction (`textElements()`, `structuredText()`) recovers far more
|
|
57
|
+
characters from subset fonts with broken/partial `/ToUnicode`.** Type0
|
|
58
|
+
(Identity-H) subsets whose `/ToUnicode` is affine but incomplete, and simple
|
|
59
|
+
fonts using `/MacRomanEncoding` or `/Differences`, were decoded as raw WinAnsi
|
|
60
|
+
— yielding U+FFFD (`�`) for characters that are perfectly *rendered* (the glyph
|
|
61
|
+
is drawn; only the code→Unicode map is missing). Extraction now follows the
|
|
62
|
+
ISO 32000 §9.10 priority: `/ToUnicode` → embedded `cmap`/`post` (`cid_to_gid`)
|
|
63
|
+
→ an auto-calibrated affine inference for partial `/ToUnicode` subsets →
|
|
64
|
+
`/Encoding` base (WinAnsi/MacRoman/Standard) + `/Differences` resolved through
|
|
65
|
+
the Adobe Glyph List. On a real 76-font form this cut U+FFFD from **243 to 25**
|
|
66
|
+
per page (the 25 residual are codes that *no* source in the file maps — not
|
|
67
|
+
recoverable by any reader). **Page rendering was already correct and is
|
|
68
|
+
unchanged** — this only affects the extracted/editable text layer.
|
|
69
|
+
|
|
7
70
|
## [0.58.2] - 2026-06-21
|
|
8
71
|
|
|
9
72
|
### Fixed
|
package/gigapdf.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qrcommunication/gigapdf-lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "TypeScript SDK for gigapdf-lib — a Rust→WASM document engine with no third-party PDF/Office/image library: read/edit/render, OCR, full-text search, AcroForm fields (read · fill · create), annotations, signing, encryption, PDF↔Office/HTML/RTF conversions, and a native HTML+CSS→PDF renderer with inline JavaScript (no headless browser). Cryptography uses audited RustCrypto; JavaScript uses the Boa engine; everything else is pure Rust. Single wasm-bindgen-free .wasm with one host import (entropy).",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"author": "Rony Licha / QR Communication",
|