@qrcommunication/gigapdf-lib 0.58.1 → 0.58.3

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 CHANGED
@@ -4,6 +4,42 @@ 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.58.3] - 2026-06-21
8
+
9
+ ### Fixed
10
+
11
+ - **Text extraction (`textElements()`, `structuredText()`) recovers far more
12
+ characters from subset fonts with broken/partial `/ToUnicode`.** Type0
13
+ (Identity-H) subsets whose `/ToUnicode` is affine but incomplete, and simple
14
+ fonts using `/MacRomanEncoding` or `/Differences`, were decoded as raw WinAnsi
15
+ — yielding U+FFFD (`�`) for characters that are perfectly *rendered* (the glyph
16
+ is drawn; only the code→Unicode map is missing). Extraction now follows the
17
+ ISO 32000 §9.10 priority: `/ToUnicode` → embedded `cmap`/`post` (`cid_to_gid`)
18
+ → an auto-calibrated affine inference for partial `/ToUnicode` subsets →
19
+ `/Encoding` base (WinAnsi/MacRoman/Standard) + `/Differences` resolved through
20
+ the Adobe Glyph List. On a real 76-font form this cut U+FFFD from **243 to 25**
21
+ per page (the 25 residual are codes that *no* source in the file maps — not
22
+ recoverable by any reader). **Page rendering was already correct and is
23
+ unchanged** — this only affects the extracted/editable text layer.
24
+
25
+ ## [0.58.2] - 2026-06-21
26
+
27
+ ### Fixed
28
+
29
+ - **Named colour spaces (`/Separation`, `/ICCBased`, `/Indexed`, `/DeviceN`) are
30
+ now resolved when extracting vector paths (`elements()`, `vectorPaths()`).**
31
+ Previously the content-layer vector extractor carried its own simplistic
32
+ colour-space model (Device Gray/RGB/CMYK only): any *named* colour space set
33
+ via `cs`/`CS` fell back to `Unknown` and `sc`/`scn` operands were guessed by
34
+ arity, so a 1-component Separation tint was misread as grey — a blue spot/ICC
35
+ fill rendered **black/grey**, and unresolvable fills were **dropped entirely**.
36
+ Vector extraction now reuses the rasteriser's full colour pipeline
37
+ (`raster/colorspace.rs` tint-transform via the PDF function evaluator,
38
+ ICCBased by `/N`, Indexed palette lookup), resolving named spaces against the
39
+ page `/Resources/ColorSpace`. Separation `/Black` tint `1.0` → true black,
40
+ spot/ICC blues → their real RGB. The rasteriser path was already correct and
41
+ is unchanged.
42
+
7
43
  ## [0.58.1] - 2026-06-21
8
44
 
9
45
  ### Fixed
package/gigapdf.wasm CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrcommunication/gigapdf-lib",
3
- "version": "0.58.1",
3
+ "version": "0.58.3",
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",