@qrcommunication/gigapdf-lib 0.114.1 → 0.116.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 +106 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js.map +1 -1
- package/gigapdf.wasm +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,112 @@ project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.116.0] - 2026-07-03
|
|
10
|
+
|
|
11
|
+
### Fixed — images survived NO JSON-bridged export (html, rtf, epub, md)
|
|
12
|
+
|
|
13
|
+
`ImageRef.resource` — the u64 content hash keying `resources.images` — was
|
|
14
|
+
serialized as a **raw JSON number**. JavaScript rounds integers beyond 2^53,
|
|
15
|
+
so any host round-tripping the model through JSON (`toModel()` →
|
|
16
|
+
`modelToHtml`/`modelToRtf`/`modelToEpub`/`modelToMarkdown`) corrupted every
|
|
17
|
+
image id and the resource lookup failed silently: **zero images** in HTML/RTF
|
|
18
|
+
output, EPUB packages with orphaned (unreferenced) images, wrong Markdown
|
|
19
|
+
file names. The id is now serialized as a **string** (the Rust reader accepts
|
|
20
|
+
both forms, so older JSON still loads). A pitch deck went from 0 to 37 images
|
|
21
|
+
in HTML, RTF and EPUB exports. Direct exports (`toDocx`…) were unaffected.
|
|
22
|
+
|
|
23
|
+
### Changed — PDF→XLSX/ODS export through the reconstructed model
|
|
24
|
+
|
|
25
|
+
`toXlsx()`/`toOds()` used a legacy glyph-grid path that dropped text runs the
|
|
26
|
+
model keeps (names, dates, reference numbers measurably missing on a real
|
|
27
|
+
letter) and produced untyped, unstyled grids. They now export through
|
|
28
|
+
`reconstruct_model` like every other format: typed tables with merged cells
|
|
29
|
+
(`col_span`), bold header rows and shading — and when a PDF has no
|
|
30
|
+
spreadsheet blocks, a worksheet is synthesized per page from the model
|
|
31
|
+
(tables as real rows/cells, paragraphs/headings/lists as reading-order
|
|
32
|
+
rows). The grid writer stays available for host-provided grids
|
|
33
|
+
(`gridsToXlsx`).
|
|
34
|
+
|
|
35
|
+
### SDK
|
|
36
|
+
|
|
37
|
+
- `GigaImageRef.resource` is typed `string | number` (canonical: string).
|
|
38
|
+
|
|
39
|
+
## [0.115.0] - 2026-07-03
|
|
40
|
+
|
|
41
|
+
Fidelity release across the whole conversion matrix, both directions —
|
|
42
|
+
driven by an exhaustive empirical audit (real-world corpus + synthetic
|
|
43
|
+
feature documents).
|
|
44
|
+
|
|
45
|
+
### Fixed — extracted text of every Office-produced PDF (bullets, accents, €…)
|
|
46
|
+
|
|
47
|
+
The gid→Unicode map merged ALL cmap subtables with "lowest codepoint wins",
|
|
48
|
+
so the **Mac Roman** subtable injected its raw bytes as Unicode: the bullet
|
|
49
|
+
glyph was declared as `¥` (and `é`/`€`/`–`/curly quotes were wrong) in the
|
|
50
|
+
`/ToUnicode` of every font embedded by the HTML→PDF renderer. The rasterized
|
|
51
|
+
page was correct, but extraction/search/copy-paste — and any editor overlay
|
|
52
|
+
built on extracted text — showed `¥` instead of `•`. Subtables are now
|
|
53
|
+
merged with strict priority and Mac Roman is translated. A real 72-page
|
|
54
|
+
Word document went from 216 `¥` / 0 `•` to 216 `•`.
|
|
55
|
+
|
|
56
|
+
### Fixed — lists are faithful in BOTH directions
|
|
57
|
+
|
|
58
|
+
- DOCX/ODT import: real bullet characters (`w:lvlText`, Symbol/Wingdings
|
|
59
|
+
PUA resolved, per-level defaults `•`/`◦`/`▪`), numbering formats with
|
|
60
|
+
their real suffix (`1.` vs `a)`), `w:start`/overrides honoured; ODT
|
|
61
|
+
numbered lists no longer render as bullets.
|
|
62
|
+
- Model: `List.marker_suffix` (additive JSON field) + per-level ordinal
|
|
63
|
+
counters everywhere (model→PDF no longer prints a running global count).
|
|
64
|
+
- Exports: DOCX `numbering.xml` carries `%1{suffix}` + start; ODT
|
|
65
|
+
`style:num-suffix`; HTML nests real `<ul>/<ol>` (+ `start`); Markdown
|
|
66
|
+
indents by level with per-level ordinals. RTF `\'xx` bytes now decode
|
|
67
|
+
through Symbol/Wingdings charsets (`•` instead of `·`).
|
|
68
|
+
|
|
69
|
+
### Fixed — exported files open and look right ([EXPORT])
|
|
70
|
+
|
|
71
|
+
- **PDF→DOCX was refused by Word/LibreOffice** whenever a reconstructed
|
|
72
|
+
header/footer contained a shape: the VML markup lacked its `xmlns:v`
|
|
73
|
+
declaration. All four corpus exports now convert cleanly.
|
|
74
|
+
- Reconstructed section margins are clamped (no more 578 pt bottom
|
|
75
|
+
margins) and left indents are re-anchored to the estimated margin (text
|
|
76
|
+
no longer shifts right by a double offset).
|
|
77
|
+
- A letter no longer exports with **phantom two-column layout**: column
|
|
78
|
+
detection now requires real side-by-side text spans.
|
|
79
|
+
- **PDF→PPTX slides are no longer empty**: framed blocks become positioned
|
|
80
|
+
shapes/pictures (37 media exported from a pitch deck that previously
|
|
81
|
+
exported zero).
|
|
82
|
+
- Positioned images export as `wp:anchor` at their exact page offset
|
|
83
|
+
(was: inlined at a default size); footers matching "Page N / M" emit
|
|
84
|
+
dynamic `PAGE`/`NUMPAGES` fields.
|
|
85
|
+
|
|
86
|
+
### Fixed — real-world files open at all ([IMPORT])
|
|
87
|
+
|
|
88
|
+
- The zip reader now parses the **End-Of-Central-Directory / central
|
|
89
|
+
directory** (zip64 included): OOXML/ODF files written with streaming
|
|
90
|
+
**data descriptors** — 3 of 8 real-world files in the audit corpus, and
|
|
91
|
+
every LibreOffice ODT/ODP — previously imported as EMPTY documents.
|
|
92
|
+
- ODP: text inside `draw:custom-shape` (LibreOffice's standard text box)
|
|
93
|
+
is now read and positioned; slide geometry comes from the master page
|
|
94
|
+
(a 16:9 deck no longer imports as A4 portrait).
|
|
95
|
+
- **One slide = one page**: PPTX/ODP decks no longer stack every slide on
|
|
96
|
+
1-2 pages (11-slide and 39-slide decks paginate exactly); slide images
|
|
97
|
+
are resolved from the slide part (they were all silently dropped) and
|
|
98
|
+
sized to their real frame.
|
|
99
|
+
|
|
100
|
+
### Fixed — opening a Word file looks like Word (display path)
|
|
101
|
+
|
|
102
|
+
- Character styles now render: strikethrough, highlight (`w:highlight`,
|
|
103
|
+
run `w:shd`), superscript/subscript, letter-spacing, hidden runs.
|
|
104
|
+
- Tables: cell shading, vertical alignment, real border resolution
|
|
105
|
+
(`w:tcBorders`/`w:tblBorders`, `nil` respected), **real `w:vMerge`
|
|
106
|
+
rowspans** and `gridSpan` colspans (no more phantom cells or hard-coded
|
|
107
|
+
spans), cell widths.
|
|
108
|
+
- Headers/footers repeat on **every page** through the renderer's
|
|
109
|
+
header/footer bands, with live `PAGE`/`NUMPAGES` fields (`Page 2 / 2`
|
|
110
|
+
on page 2); `w:pgMar` header/footer offsets honoured.
|
|
111
|
+
- Multi-column sections render with real CSS columns (`w:cols` + gap) and
|
|
112
|
+
`column_count` reaches the model; continuous section breaks no longer
|
|
113
|
+
force a page break.
|
|
114
|
+
|
|
9
115
|
## [0.114.1] - 2026-07-03
|
|
10
116
|
|
|
11
117
|
### Fixed — `replaceText` no longer empties or garbles runs (re-encoding = exact inverse of decoding)
|