@qrcommunication/gigapdf-lib 0.71.1 → 0.104.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 CHANGED
@@ -4,6 +4,631 @@ 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.104.0] - 2026-06-25
8
+
9
+ Four issue lists closed — [#75], [#76], [#77], [#78]: PDF→model reconstruction,
10
+ annotation appearances, serialization (linearization + PDF 2.0), and RTF-export
11
+ fidelity — plus the previously-unreleased PDF/A archival conformance
12
+ ([veraPDF](https://verapdf.org/)-validated, ISO 19005).
13
+
14
+ ### Added
15
+
16
+ - **PDF version selector for compact / linearized output ([#77]).** `saveOptimized`
17
+ accepts `{ version?: "1.7" | "2.0" }`, and `toLinearized(version)` /
18
+ `saveLinearized(version)` take the same; new exported type
19
+ `PdfVersion = "1.7" | "2.0"` (default `"1.7"`). The compact and Fast-Web-View
20
+ writers can now declare a PDF 2.0 header.
21
+ - **Selectable PDF/A conformance level.** `toPdfA(level?)` accepts `"pdfa-1b"` ·
22
+ `"pdfa-1a"` · `"pdfa-2b"` (default, backward-compatible) · `"pdfa-2u"` ·
23
+ `"pdfa-2a"` · `"pdfa-3b"`; core `to_pdfa_level(level)` + `PdfaLevel` enum.
24
+ Levels **1b/1a** emit a `%PDF-1.4` header (ISO 19005-1), the others `%PDF-1.7`;
25
+ **2u** keeps every glyph mapped to Unicode (`/ToUnicode`); **3b** permits
26
+ embedded files (`/AF`); **1a/2a** are level A (Tagged PDF, see below). All six
27
+ pass veraPDF (`isCompliant = true`).
28
+ - **Tagged PDF — level A conformance (`pdfa-1a`, `pdfa-2a`).** ISO 19005 level A
29
+ adds the logical-structure tree the engine already infers. On a level-A export
30
+ the catalog gains `/MarkInfo << /Marked true >>`, `/Lang`, and a `/StructTreeRoot`
31
+ whose tree is derived from the document structure (`Document` → `P` / `H1`…`H6`
32
+ / `Table` / `TR` / `TH` / `TD` / `L` / `LI` / `LBody` / `Figure`), backed by a
33
+ `/ParentTree`. Content is marked up in the page streams — each tagged run wrapped
34
+ as `/<role> << /MCID n >> BDC … EMC`, non-tagged marks emitted as `/Artifact` —
35
+ so the structure is render-neutral (pixels are identical to the untagged
36
+ export). Validated `isCompliant = true` against veraPDF for **both** 2a and 1a.
37
+ - **Conformance CI gate** (`conformance.yml`). Generates fixtures from the SDK
38
+ and validates them against reference validators only — veraPDF for PDF/A (the
39
+ six levels), qpdf for PDF, structural OPC/ODF checks for the Office/ODF exports
40
+ — failing the build on any regression.
41
+
42
+ ### Fixed
43
+
44
+ - **PDF/A-2b trailer `/ID`** (ISO 19005-2 cl. 6.1.3). `to_pdfa` set a
45
+ deterministic `/ID`, but `serialize::to_pdf` rebuilt the trailer and dropped
46
+ it; the classic serializer now preserves `/ID`, matching the compressed and
47
+ encrypted serializers.
48
+ - **PDF/A appearance & graphics-state sanitization.** On PDF/A export, annotation
49
+ appearance dictionaries are reduced to `/N` only (cl. 6.3.3), the `/TR`
50
+ transfer-function key is removed from ExtGState (cl. 6.2.5), and incomplete
51
+ `/CIDSet` entries are dropped (cl. 6.2.11.4.2) — all render-neutral.
52
+
53
+ ### Improved
54
+
55
+ - **Serialization — linearization, incremental updates & versioned output ([#77]).**
56
+ The Fast-Web-View (linearized) hint stream now carries the true per-page
57
+ content-stream length and adds the document-outline (`/O`) and thread-information
58
+ (`/A`) hint tables (ISO 32000-1 Annex F.3.3); incremental updates (used by signing's
59
+ DSS / document-timestamp appends) now match the base file's cross-reference form — an
60
+ xref **stream** when the base uses one. `saveOptimized()` now emits a `%PDF-1.7`
61
+ banner by default (was 1.5).
62
+ - **Annotations — appearance fidelity ([#76]).** `regenerateAppearance()` now rebuilds
63
+ the appearance for FreeText, Stamp, Text, Link, Squiggly and FileAttachment, plus
64
+ Redaction and placeholder 3D / RichMedia / Movie / Sound annotations (several
65
+ previously returned “unsupported”; FreeText now succeeds). Rubber-stamp `/Name`
66
+ follows the label (ISO standard stamps recognised); FreeText centre/right alignment
67
+ uses the real Core-14 AFM advances of the `/DA` font; ink strokes are smoothed
68
+ (Catmull-Rom → Bézier) and squiggly markup renders as a true sinusoid.
69
+ - **RTF export — fonts & images ([#78]).** `modelToRtf` / `toRtf` emit a real per-run
70
+ font table (`\fonttbl` with `\froman` / `\fswiss` / `\fmodern` classes; each run
71
+ selects its `\fN`) instead of a single hardcoded font, and transcode GIF / WebP /
72
+ AVIF pictures to PNG (`\pict\pngblip`) instead of dropping them.
73
+ - **PDF → model reconstruction ([#75]).** Multi-paragraph table cells, header-row
74
+ detection by font size / shading (and footers), `Cell.shading` / `Row.is_header`
75
+ populated for ruled tables, decimal-column alignment on real glyph advances,
76
+ single-gutter fallback, 3-line heading promotion with a bold-subhead guard,
77
+ marker-format list nesting, ordered lists starting ≠ 1, document-wide leading
78
+ fallback, image-only header/footer (logo) detection, and a page-number digit-fold
79
+ guard — all flow through every PDF → Office/HTML/RTF/text conversion.
80
+
81
+ ## [0.100.0] - 2026-06-25
82
+
83
+ Engine improvements only — no new SDK methods. The last in-scope Office-import
84
+ ([#3](https://github.com/qrcommunication/gigapdf-lib/issues/3)) fidelity items.
85
+
86
+ ### Improved
87
+
88
+ - **`officeToModel`** — XLSX/ODS sheet **column widths** are imported (and round-trip
89
+ through export); **DOCX track-changes** are accepted to the final version (insertions
90
+ kept, deletions dropped — deleted text no longer leaks), and comment markers no longer
91
+ corrupt parsing.
92
+
93
+ ## [0.99.0] - 2026-06-25
94
+
95
+ Engine improvements only — no new SDK methods; `officeToModel` and the PDF→model
96
+ reconstruction get higher fidelity, and one roadmap closes.
97
+
98
+ ### Improved
99
+
100
+ - **DOCX Office Math ([#37]) complete** — `officeToModel` now linearizes OMML
101
+ equations to readable Unicode math (fractions, radicals, sub/superscripts, ∑/∫,
102
+ matrices…) instead of dropping them. ([#37](https://github.com/qrcommunication/gigapdf-lib/issues/37))
103
+ - **Table header rows** — `Row.is_header` is detected in PDF→model reconstruction and
104
+ round-trips through DOCX/ODF/HTML/EPUB import+export+render (+ JSON).
105
+ - **PDF→model** — heading levels are clustered document-wide (consistent across pages),
106
+ and page `/Rotate` now applies to tagged-PDF block geometry.
107
+
108
+ ## [0.98.0] - 2026-06-25
109
+
110
+ Engine improvements only — no new SDK methods; existing conversion methods reach
111
+ markedly higher fidelity, and two conversion roadmaps close.
112
+
113
+ ### Improved
114
+
115
+ - **Office export ([#2]) complete** — `modelTo{Docx,Xlsx,Pptx,Odt,Ods,Odp}` now
116
+ preserve multi-section page setup, super/subscript, spreadsheet underline/strike,
117
+ ODT block shapes, internal page links, real PPTX/ODP non-slide structures, and
118
+ explicit run colour. ([#2](https://github.com/qrcommunication/gigapdf-lib/issues/2))
119
+ - **Other-format conversions ([#4]) complete** — RTF import decodes WMF/EMF/DIB
120
+ pictures (`\bin` + hex), finishing the rich RTF↔model / `toText` / `toRtf` / CSV /
121
+ Markdown / EPUB / PDF-A roadmap. ([#4](https://github.com/qrcommunication/gigapdf-lib/issues/4))
122
+ - **In-house WMF/EMF metafile decoder** — embedded Windows metafiles in `.rtf` and
123
+ Office packages now rasterize (previously dropped).
124
+ - **Office import ([#3])** — PPTX/ODP run styling + paragraph + lists, ODS
125
+ merges/number-formats/fills, DOCX `w:vMerge` row spans, internal hyperlink-anchor
126
+ resolution, speaker notes, and embedded-image format detection.
127
+ - **PDF→model ([#5])** — page `/Rotate` honored, tagged blocks land on their real pages.
128
+
129
+ ## [0.97.0] - 2026-06-25
130
+
131
+ Engine improvements only — no new SDK methods; existing conversion/render/read
132
+ methods get markedly higher fidelity.
133
+
134
+ ### Improved
135
+
136
+ - **JPEG 2000 (`JPXDecode`) images** now render and extract (a from-scratch
137
+ decoder wired into the image pipeline) — the third hand-written image codec
138
+ after CCITTFax and JBIG2. ([#35](https://github.com/qrcommunication/gigapdf-lib/issues/35))
139
+ - **`toPdfA` is now veraPDF-validated conformant** — every font embedded (or
140
+ metric-matched-substituted), encryption + JavaScript stripped, metadata from
141
+ the document. ([#4](https://github.com/qrcommunication/gigapdf-lib/issues/4))
142
+ - **Conversion fidelity** advanced across the open roadmaps: PDF→model recon
143
+ (FontDescriptor bold/italic, robust columns/lines, table spans/sparse/rotated,
144
+ tagged `/ColSpan`/`/ListNumbering`/`/Pg`/`/BBox`); Office import (DOCX symbols/
145
+ text-boxes/field-codes, footnotes, PPTX/ODP autoshapes, ODT lists/spans);
146
+ Office export (standard CSV, Markdown colour/shapes, PPTX para formatting, run
147
+ images, hyperlinks, ODT nested lists/borders); RTF/text model-aware export;
148
+ CSV typed-cell import.
149
+
150
+ ## [0.96.0] - 2026-06-25
151
+
152
+ PDF linearization + from-scratch bilevel codecs, plus a broad conversion-fidelity
153
+ pass. New SDK surface:
154
+
155
+ ### Added
156
+
157
+ - **`toLinearized()` / `saveLinearized()`** — produce a linearized ("Fast Web
158
+ View") PDF: ISO 32000-1 Annex F layout with `/Linearized` dict + page-offset
159
+ and shared-object hint streams, byte-exact and **qpdf-clean**.
160
+ ([#67](https://github.com/qrcommunication/gigapdf-lib/issues/67))
161
+
162
+ ### Improved (engine, via existing SDK conversion/render/read methods)
163
+
164
+ - **Scanned-document PDFs** now render and extract: `CCITTFaxDecode` (G3/G4) and
165
+ `JBIG2Decode` (full ITU-T T.88) are implemented from scratch — no third-party
166
+ codec. ([#34](https://github.com/qrcommunication/gigapdf-lib/issues/34))
167
+ - **Conversion fidelity** advanced across the board (open roadmaps #2/#3/#4/#5):
168
+ XLSX/ODS cell formulas, real image formats and PPTX/ODP speaker notes on export;
169
+ DOCX/ODT headers/footers, XLSX cell styling and DOCX footnotes on import; rich
170
+ RTF↔model and GFM Markdown→model; EPUB nested TOC + unique id + inline-SVG
171
+ shapes; and PDF→model gains header/footer stripping, stable heading levels and
172
+ list false-positive rejection.
173
+
174
+ ## [0.95.0] - 2026-06-25
175
+
176
+ Thirteen roadmap issues (PDF authoring, PDF reading, Office round-trip, CI
177
+ conformance). New SDK surface:
178
+
179
+ ### Added
180
+
181
+ - **`setPageTransition(page, opts)` / `getPageTransition(page)` /
182
+ `clearPageTransition(page)`** — presentation page transitions (`/Trans`: 12
183
+ styles + direction/dimension/motion/scale) and per-page `/Dur` auto-advance.
184
+ ([#65](https://github.com/qrcommunication/gigapdf-lib/issues/65))
185
+ - **`scalePageContent(page, factor)` / `scalePageContentXy(page, sx, sy)` /
186
+ `scalePageTo(page, w, h)` / `setUserUnit(page, unit)`** — true content scaling
187
+ (stream + boxes + annotation rects) and `/UserUnit` for large-format pages.
188
+ ([#68](https://github.com/qrcommunication/gigapdf-lib/issues/68))
189
+ - **`setCollection(config)` / `collection()`** — embedded-file portfolio
190
+ `/Collection` (view, `/Schema` columns, sort, default file, per-file `/CI`).
191
+ ([#66](https://github.com/qrcommunication/gigapdf-lib/issues/66))
192
+ - **`setFigureAlt(index, alt)` / `figureCount()`** — per-figure `/Alt` accessible
193
+ alternate text for Tagged PDF / PDF/UA + PDF/A level-A exports.
194
+ ([#20](https://github.com/qrcommunication/gigapdf-lib/issues/20))
195
+
196
+ ### Improved (engine, via existing SDK conversion/render methods)
197
+
198
+ - PDF reading honors **optional-content (OCG/OCMD) visibility** during render
199
+ ([#54](https://github.com/qrcommunication/gigapdf-lib/issues/54)) and **vertical
200
+ writing mode** (`Identity-V`, `/W2`/`/DW2`)
201
+ ([#49](https://github.com/qrcommunication/gigapdf-lib/issues/49)).
202
+ - Office conversions gain document **outline/TOC** (#31), **named-style** lowering
203
+ (#30), **DOCX drawing** geometry + alt (#40), **super/subscript** (#32),
204
+ **flat-XML ODF + `.odg`** import (#53) and **table/cell vertical alignment** (#27).
205
+ - CI now validates exports against **ECMA-376 XSD + ODF RelaxNG** schemas (#19).
206
+
207
+ ## [0.94.0] - 2026-06-25
208
+
209
+ Issue [#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) — the native
210
+ HTML/CSS + inline-SVG renderer — is complete (inline `@font-face` with
211
+ ttf/otf/woff/**woff2** via a from-scratch WOFF2/brotli decoder, full UAX#9 bidi,
212
+ SVG filters, COLRv1, patterns, sticky/float/flex, …), plus 21 PDF/font/Office
213
+ fixes. New SDK surface:
214
+
215
+ ### Added
216
+
217
+ - **`addDocumentJavascript(name, script)` / `documentJavascripts()` /
218
+ `removeDocumentJavascript(name)`** — author document-level JavaScript actions in
219
+ the catalog `/Names /JavaScript` name tree (run by viewers on open).
220
+ ([#64](https://github.com/qrcommunication/gigapdf-lib/issues/64))
221
+ - **`beginOptionalContent(page, ocg)` / `endOptionalContent(page)`** — assign drawn
222
+ page content to a toggleable optional-content (OCG) layer via marked content.
223
+ ([#59](https://github.com/qrcommunication/gigapdf-lib/issues/59))
224
+ - **`placePage(target, source, x, y, sx, sy)` / `placePageMatrix(...)` /
225
+ `nUp(cols, rows, opts?)`** — N-up / imposition: place a source page as a scaled
226
+ Form XObject onto another page (2-up/4-up/contact sheets).
227
+ ([#60](https://github.com/qrcommunication/gigapdf-lib/issues/60))
228
+
229
+ ### Improved
230
+
231
+ - The HTML→PDF renderer now honours inline `@font-face` web fonts, RTL/bidi text,
232
+ SVG `filter`, COLRv1 colour fonts, `<pattern>` fills, `position: sticky`, floats,
233
+ flex column sizing, conic gradients and more — issue #1 in full.
234
+ - Office conversions gain: document metadata round-trip, DOCX paragraph/table
235
+ styling + page breaks + numbering, real slide tables, named styles, placeholder
236
+ roles, slide backgrounds; PDF reading gains inline images, hybrid `/XRefStm`,
237
+ type-1 shadings and Type1 glyph rasterisation.
238
+
239
+ ## [0.93.0] - 2026-06-24
240
+
241
+ ### Added
242
+
243
+ - **`appendPages(otherPdf, pages?)`** appends selected source pages (1-based; omit
244
+ for all); **`mergePdfs(parts)`** now accepts `(Uint8Array | { pdf, pages? })[]`,
245
+ with the new exported `MergePart` type, for page-range merges.
246
+ ([#61](https://github.com/qrcommunication/gigapdf-lib/issues/61))
247
+
248
+ ### Fixed (read/import, no SDK signature change)
249
+
250
+ - Type0 CJK composite fonts (predefined/embedded CMaps + non-Identity
251
+ `/CIDToGIDMap`) now decode/render correctly
252
+ ([#46](https://github.com/qrcommunication/gigapdf-lib/issues/46)); PPTX import
253
+ gains run hyperlinks, table cell fill/borders, theme-colour resolution, and
254
+ mirror ([#47](https://github.com/qrcommunication/gigapdf-lib/issues/47)).
255
+
256
+ ## [0.92.0] - 2026-06-24
257
+
258
+ ### Added
259
+
260
+ - **`setViewerPreferences(prefs)` / `setPageLayout(layout)` / `setPageMode(mode)`**
261
+ author the catalog reading/UX hints. `ViewerPreferences` = optional
262
+ `hideToolbar`/`hideMenubar`/`hideWindowUI`/`fitWindow`/`centerWindow`/
263
+ `displayDocTitle` (omit = leave untouched) + `direction` (`'L2R'`/`'R2L'`);
264
+ `PageLayout` ∈ SinglePage/OneColumn/TwoColumn{Left,Right}/TwoPage{Left,Right};
265
+ `PageMode` ∈ UseNone/UseOutlines/UseThumbs/FullScreen/UseOC/UseAttachments.
266
+ ([#63](https://github.com/qrcommunication/gigapdf-lib/issues/63))
267
+
268
+ ### Fixed (read/import, no SDK signature change)
269
+
270
+ - Type3 `/CharProcs` glyphs now render
271
+ ([#42](https://github.com/qrcommunication/gigapdf-lib/issues/42)); ODT import
272
+ gains paragraph styling, footnotes, body text boxes, table sizing/shading
273
+ ([#52](https://github.com/qrcommunication/gigapdf-lib/issues/52)).
274
+
275
+ ## [0.91.0] - 2026-06-24
276
+
277
+ PDF-read & Office-import fidelity (no SDK signature change): `LZWDecode`,
278
+ `ASCII85Decode`, `ASCIIHexDecode`, `RunLengthDecode` stream filters (chained
279
+ `/Filter` + `/DecodeParms`) now decode
280
+ ([#33](https://github.com/qrcommunication/gigapdf-lib/issues/33)); ODS import
281
+ gains per-cell styling, number formats, merges, and column/row sizing
282
+ ([#45](https://github.com/qrcommunication/gigapdf-lib/issues/45)).
283
+
284
+ ## [0.90.0] - 2026-06-24
285
+
286
+ PDF-read & Office-import fidelity (no SDK signature change): image `/ImageMask`
287
+ stencils + `/Mask` (explicit & colour-key) now render
288
+ ([#41](https://github.com/qrcommunication/gigapdf-lib/issues/41)); XLSX import
289
+ gains per-cell styling, number/date formats, shared formulas and hyperlinks
290
+ ([#44](https://github.com/qrcommunication/gigapdf-lib/issues/44)).
291
+
292
+ ## [0.89.0] - 2026-06-24
293
+
294
+ PDF-read fidelity (no SDK signature change): FlateDecode/LZW `/DecodeParms`
295
+ predictors (TIFF 2, PNG 10–15) for image **and** xref/object streams
296
+ ([#57](https://github.com/qrcommunication/gigapdf-lib/issues/57)); CalGray/CalRGB
297
+ gamma + matrix + white-point colour conversion, ICCBased `/N` fallback corrected
298
+ ([#58](https://github.com/qrcommunication/gigapdf-lib/issues/58)).
299
+
300
+ ## [0.88.1] - 2026-06-24
301
+
302
+ HTML/CSS renderer: `box-shadow: inset` is now painted (a clipped shadow frame
303
+ inside the box) instead of dropped. HTML→PDF path only — no SDK signature change
304
+ ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item B).
305
+
306
+ ## [0.88.0] - 2026-06-24
307
+
308
+ HTML/CSS renderer: `flex-basis` / `flex-grow` / `flex-shrink` now apply on the
309
+ **column** axis (flexing item heights against a definite container `height`), not
310
+ just the row axis. HTML→PDF path only — no SDK signature change
311
+ ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item A).
312
+
313
+ ## [0.87.2] - 2026-06-24
314
+
315
+ HTML/CSS renderer: 3-D `border-style`s `inset`/`outset`/`groove`/`ridge` now shade
316
+ the sides for depth instead of rendering flat `solid`. HTML→PDF path only — no SDK
317
+ signature change ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item C).
318
+
319
+ ## [0.87.1] - 2026-06-24
320
+
321
+ HTML/CSS renderer: `aspect-ratio` now derives a block's height from its width
322
+ (`width / ratio`) when no definite `height` is set. HTML→PDF path only — no SDK
323
+ signature change ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item A).
324
+
325
+ ## [0.87.0] - 2026-06-24
326
+
327
+ HTML/CSS renderer: colour **alpha** (`rgba()`/`hsla()`/`#rgba`/`#rrggbbaa`) is now
328
+ applied — folded into the opacity of the text/background/border/cell it paints,
329
+ composing with `opacity` — instead of being dropped. Also fixes function colours
330
+ with internal spaces (`rgba(0, 0, 0, .5)`) in the `background`/`border` shorthands.
331
+ HTML→PDF path only — no SDK signature change
332
+ ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item C).
333
+
334
+ ## [0.86.1] - 2026-06-24
335
+
336
+ HTML/CSS renderer: `grid-template-rows` now resolves `%` and `fr` rows (against
337
+ the grid's definite `height`), not just fixed `pt`. HTML→PDF path only — no SDK
338
+ signature change ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item A).
339
+
340
+ ## [0.86.0] - 2026-06-24
341
+
342
+ HTML/CSS renderer: `overflow: hidden`/`clip` now emit a **real PDF clip** (text,
343
+ images, backgrounds, gradients straddling an edge are pixel-clipped; nested boxes
344
+ intersect). `height` is now a **definite** height (content overflows + is clipped)
345
+ instead of a `min-height` alias; text runs carry their width so overflowing text
346
+ is clipped too. HTML→PDF path only — no SDK signature change
347
+ ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item A).
348
+
349
+ ## [0.85.4] - 2026-06-24
350
+
351
+ HTML/CSS renderer: `flex-direction: row-reverse` / `column-reverse` now run the
352
+ main axis from the far end (were collapsed to the forward axis) in the HTML→PDF
353
+ path ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item A). No API change.
354
+
355
+ ## [0.85.3] - 2026-06-24
356
+
357
+ HTML/CSS renderer: `justify-content: space-evenly` now uses `n + 1` equal gaps
358
+ (was aliased to `space-around`) in the HTML→PDF path
359
+ ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item A). No API change.
360
+
361
+ ## [0.85.2] - 2026-06-24
362
+
363
+ HTML/CSS renderer: `currentColor` now resolves to the element's cascaded `color`
364
+ (borders, background, and the `border` shorthand) in the HTML→PDF path
365
+ ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item C). No API change.
366
+
367
+ ## [0.85.1] - 2026-06-24
368
+
369
+ HTML/CSS renderer: absolute & relative CSS length units — `cm`, `mm`, `in`, `pc`,
370
+ `q`, `ex`, `ch` — now resolve in the HTML→PDF path
371
+ ([#1](https://github.com/qrcommunication/gigapdf-lib/issues/1) item E). No API change.
372
+
373
+ ## [0.85.0] - 2026-06-24
374
+
375
+ Standalone tagged-PDF / PDF-UA authoring. Resolves
376
+ [#18](https://github.com/qrcommunication/gigapdf-lib/issues/18).
377
+
378
+ ### Added
379
+
380
+ - **`doc.toTagged({ pdfUa? })`** — author a tagged (accessible) PDF: a
381
+ `/StructTreeRoot` logical-structure tree with marked content, `/MarkInfo`,
382
+ `/Lang`, `/RoleMap` and `/Alt` on figures, **without** forcing PDF/A. `pdfUa`
383
+ adds the PDF/UA-1 identifier (ISO 14289).
384
+
385
+ ## [0.84.0] - 2026-06-24
386
+
387
+ Public-key (certificate) encryption + password management. Resolves
388
+ [#17](https://github.com/qrcommunication/gigapdf-lib/issues/17).
389
+
390
+ ### Added
391
+
392
+ - **`doc.encryptForRecipients(certificates, opts?)`** — encrypt to one or more
393
+ X.509 recipients (`/Filter /Adobe.PubSec`); only a recipient private key opens
394
+ it. `certificates` are DER certs; `opts = { flags?, permissions?, aes256?,
395
+ encryptMetadata?, seed?, rngSeed? }` (`seed`/`rngSeed` default to Web Crypto).
396
+ - **`engine.openWithPrivateKey(pdf, certificate, privateKey)`** — open a
397
+ public-key-encrypted PDF with a DER cert + PKCS#1 RSA key (`null` if not a
398
+ recipient).
399
+ - **`doc.changePasswords(newPassword, fileId, opts?)`** — re-encrypt an opened
400
+ document with new passwords (`opts` adds `encryptMetadata?`).
401
+ - **`doc.removeEncryption()`** — strip encryption → plaintext PDF.
402
+
403
+ ## [0.83.0] - 2026-06-24
404
+
405
+ Press-ready colour authoring. Resolves
406
+ [#11](https://github.com/qrcommunication/gigapdf-lib/issues/11) (CMYK / spot /
407
+ ICC OutputIntent / overprint).
408
+
409
+ ### Added
410
+
411
+ - **`Color`** union type — `{ space: "rgb", rgb }` · `{ space: "cmyk", c,m,y,k }`
412
+ · `{ space: "gray", gray }` · `{ space: "separation", name, tint, cmyk }` ·
413
+ `{ space: "icc", components, profile }`. CMYK/gray/tint components are `0`…`1`.
414
+ - **`addFilledRectangle(page, rect, color, opacity?)`** and
415
+ **`addFilledPolygon(page, points, color, opacity?)`** — fill shapes in any
416
+ colour space.
417
+ - **`addTextColor(page, x, y, size, text, font, color, opts?)`** — base-14 text
418
+ in any colour space (`opts = { opacity?, rotation?, underline?, strikethrough? }`).
419
+ - **`setOverprint(page, fill, stroke, mode?)`** — prepress overprint (`/op`,
420
+ `/OP`, `/OPM`).
421
+ - **`addOutputIntent(profile, condition)`** — embed an ICC profile as a document
422
+ OutputIntent (`/S /GTS_PDFX`), decoupled from PDF/A.
423
+
424
+ ## [0.82.0] - 2026-06-24
425
+
426
+ Gradient authoring. Resolves
427
+ [#12](https://github.com/qrcommunication/gigapdf-lib/issues/12) (gradients;
428
+ tiling patterns / blend modes deferred).
429
+
430
+ ### Added
431
+
432
+ - **`addGradient(page, spec)`.** Paint a **linear** or **radial** gradient over a
433
+ rectangle. `spec = { kind: "linear" | "radial", coords, stops, rect, extend?,
434
+ opacity? }` — `coords` is `[x0,y0,x1,y1]` (linear) or `[x0,y0,r0,x1,y1,r1]`
435
+ (radial); `stops` is ≥ 2 `{ offset, rgb }`. Rendered as a shading pattern (ISO
436
+ 32000-1 §8.7.4/§8.7.3); the stops compile to a PDF interpolation function.
437
+ - New exported types **`GradientSpec`** and **`GradientStop`**.
438
+
439
+ ## [0.81.0] - 2026-06-24
440
+
441
+ Compact output — object streams + cross-reference stream. Resolves
442
+ [#10](https://github.com/qrcommunication/gigapdf-lib/issues/10) (linearization
443
+ excepted).
444
+
445
+ ### Added
446
+
447
+ - **`saveOptimized(opts?)`.** Serialize with PDF 1.5+ **object streams**
448
+ (`/ObjStm`) + a **cross-reference stream** (`/XRef`) — the most compact output.
449
+ `opts = { objectStreams?, xrefStreams? }` (both default `true`; `objectStreams`
450
+ implies `xrefStreams`). Streams are Flate-compressed first, like
451
+ `saveCompressed`.
452
+
453
+ Both modes are validated with `qpdf --check`. Linearization (Fast Web View) is
454
+ not performed.
455
+
456
+ ## [0.80.0] - 2026-06-24
457
+
458
+ Signature verification + DocMDP certification. Resolves
459
+ [#16](https://github.com/qrcommunication/gigapdf-lib/issues/16).
460
+
461
+ ### Added
462
+
463
+ - **`signatures()`.** List every signature (`/Sig` field) with `{ fieldName,
464
+ signerName, reason, location, date, subFilter, byteRange }`.
465
+ - **`verifySignatures(pdfBytes)`.** Cryptographically verify each signature
466
+ against the **original bytes** — `{ byteRangeOk, digestOk, signatureOk,
467
+ coversWholeDocument, signerCommonName, certCount, algorithm }`. `digestOk` is
468
+ content integrity (ByteRange SHA-256 vs CMS `messageDigest`); `signatureOk` is
469
+ the RSA SignerInfo signature. RSA + SHA-256 only.
470
+ - **`certify(fields, random, docmdpLevel, keyBits?)`.** Certify the document
471
+ (DocMDP) — writes `/Perms /DocMDP` + a `/Reference` transform; `docmdpLevel` is
472
+ `1` (no changes), `2` (form-fill + sign) or `3` (also annotate).
473
+ - New exported types **`SignatureInfo`** and **`SignatureReport`**.
474
+
475
+ ## [0.79.0] - 2026-06-24
476
+
477
+ Interactive-form completeness: signature fields, field JavaScript, calculation
478
+ order, field deletion and appearance regeneration. Resolves
479
+ [#15](https://github.com/qrcommunication/gigapdf-lib/issues/15).
480
+
481
+ ### Added
482
+
483
+ - **`addSignatureField(page, name, rect, opts?)`.** A visible signature field
484
+ (`/FT /Sig`) the signing pipeline can target; sets the AcroForm `/SigFlags`.
485
+ - **`setFieldScript(name, trigger, js)`.** Field-level JavaScript on a field's
486
+ `/AA` — `trigger ∈ "keystroke" | "format" | "validate" | "calculate"` (input
487
+ masks, formatting, validation, computed totals).
488
+ - **`setCalculationOrder(names)`.** The AcroForm `/CO` recalculation order.
489
+ - **`removeField(name)`.** Delete a field (from `/Fields`, `/CO` and page annots).
490
+ - **`regenerateFieldAppearance(name)`.** Rebuild a field's appearance after a
491
+ programmatic value change (text / choice / checkbox).
492
+
493
+ ## [0.78.0] - 2026-06-24
494
+
495
+ Full action & destination navigation model. Resolves
496
+ [#14](https://github.com/qrcommunication/gigapdf-lib/issues/14).
497
+
498
+ ### Added
499
+
500
+ - **`addLink(page, rect, action)`.** A link over `rect` carrying any `Action` —
501
+ `goto` (with every fit mode: `xyz`/`fit`/`fitH`/`fitV`/`fitR`/`fitB`/`fitBH`/
502
+ `fitBV`/`named`), `gotoR` (remote file), `uri`, `named` viewer navigation,
503
+ `launch`, `javascript`, `submitForm`, `resetForm`.
504
+ - **`setOpenAction(action)`.** Set the document `/OpenAction` performed on open.
505
+ - **`removeLink(page, linkIndex)`.** Delete the *n*-th `/Link` annotation on a
506
+ page (other annotations untouched).
507
+ - **`setBookmarks(bookmarks)`.** Replace the outline with `Bookmark[]`
508
+ (`{title, level, action?}`) — bookmarks can carry any action (a `goto` becomes
509
+ a `/Dest`, anything else an `/A`).
510
+ - New exported types: **`Action`**, **`Destination`**, **`Bookmark`**.
511
+
512
+ ## [0.77.0] - 2026-06-24
513
+
514
+ Geometric annotation subtypes + appearance regeneration. Resolves
515
+ [#13](https://github.com/qrcommunication/gigapdf-lib/issues/13).
516
+
517
+ ### Added
518
+
519
+ - **`addCircleAnnotation` / `addPolygonAnnotation` / `addPolylineAnnotation` /
520
+ `addCaretAnnotation`.** The missing geometric annotation subtypes (`/Circle`,
521
+ `/Polygon`, `/PolyLine`, `/Caret`), with border width and interior colour, each
522
+ rendered via a generated `/AP` appearance stream.
523
+ - **`regenerateAppearance(page, index)`.** Rebuild an existing annotation's baked
524
+ appearance after editing its colour/border/geometry (Square, Circle, Line,
525
+ Polygon, PolyLine, Highlight, Underline, StrikeOut, Ink, Caret); `false` for
526
+ subtypes that can't be reconstructed (FreeText/Stamp/Text/Link).
527
+
528
+ A text watermark already exists as `addWatermark`, so no new watermark method was
529
+ added.
530
+
531
+ ## [0.76.0] - 2026-06-24
532
+
533
+ General document metadata (XMP + typed Info, kept in sync). Resolves
534
+ [#7](https://github.com/qrcommunication/gigapdf-lib/issues/7).
535
+
536
+ ### Added
537
+
538
+ - **`setInfo(fields)` / `getXmp()` / `setXmp(xmp)`.** `setInfo` writes the typed
539
+ document-information fields (`{ title?, author?, subject?, keywords?, creator?,
540
+ producer?, creationDate?, modDate? }`) to **both** the `/Info` dictionary and a
541
+ synced XMP `/Metadata` packet — a partial update (omitted fields are left
542
+ unchanged), curing the classic Info-vs-XMP "two sources of truth" drift.
543
+ `getXmp`/`setXmp` read and replace the raw XMP packet (bytes or string). New
544
+ `InfoFields` type. The single-key `setMetadata(key, value)` is unchanged (it
545
+ touches only `/Info`).
546
+
547
+ ## [0.75.0] - 2026-06-24
548
+
549
+ Writable file attachments + Factur-X / ZUGFeRD `/AF`. Resolves
550
+ [#9](https://github.com/qrcommunication/gigapdf-lib/issues/9).
551
+
552
+ ### Added
553
+
554
+ - **`addAttachment` / `addAssociatedFile` / `removeAttachment` /
555
+ `addFileAttachmentAnnot`.** Embed, replace and remove document-level file
556
+ attachments (`/Names /EmbeddedFiles`), anchor a visible `FileAttachment`
557
+ annotation, and link **associated files** (`/AF`, PDF/A-3) — the mechanism
558
+ hybrid e-invoices (Factur-X / ZUGFeRD / Order-X) use to carry their invoice XML
559
+ (`addAssociatedFile(name, bytes, "alternative", …)`). Attachment bytes are stored
560
+ FlateDecode-compressed; re-using a name replaces it. New `AfRelationship`,
561
+ `AttachmentOptions` and `FileAttachmentIcon` types. The read side
562
+ (`attachments()`) is unchanged.
563
+
564
+ ## [0.74.0] - 2026-06-24
565
+
566
+ Page labels (`/PageLabels`). Resolves
567
+ [#8](https://github.com/qrcommunication/gigapdf-lib/issues/8).
568
+
569
+ ### Added
570
+
571
+ - **`getPageLabels()` / `setPageLabels(ranges)` / `pageLabel(page)`.** Read,
572
+ author and resolve page-numbering labels (ISO 32000-1 §12.4.2) — front matter
573
+ in roman numerals, an appendix as `A-1, A-2`, etc. `getPageLabels` returns the
574
+ ranges sorted by `startPage` (1-based); `setPageLabels` replaces them (an empty
575
+ array clears all labels); `pageLabel` returns the viewer-visible string for a
576
+ page (e.g. `"iv"`, `"A-3"`), falling back to the decimal page number outside any
577
+ range. Labels survive a save→reopen round-trip. New `PageLabelRange` /
578
+ `PageLabelStyle` types.
579
+
580
+ ## [0.73.0] - 2026-06-24
581
+
582
+ Print-production release: full read/write access to all five ISO 32000-1 page
583
+ boundary boxes. Resolves
584
+ [#6](https://github.com/qrcommunication/gigapdf-lib/issues/6).
585
+
586
+ ### Added
587
+
588
+ - **`getPageBoxes(page)` / `setPageBox(page, kind, box)`.** Read and write the
589
+ five page boundary boxes (`media`/`crop`/`bleed`/`trim`/`art`, ISO 32000-1
590
+ §14.11.2). `getPageBoxes` returns each box as `[x0, y0, x1, y1]` (points) with
591
+ inheritance and the per-box default chain applied (CropBox→MediaBox;
592
+ Bleed/Trim/Art→CropBox), plus a `declared` map flagging which boxes are
593
+ explicitly present vs inherited/defaulted. `setPageBox` takes a box as
594
+ `{ x, y, w, h }` (origin + size), normalises it, and preserves the page's other
595
+ boxes — so a `/TrimBox`/`/BleedBox` survives a save→reopen round-trip. This is
596
+ the prerequisite for PDF/X export and commercial-print pipelines (imposition,
597
+ bleed, finished-size trimming).
598
+ - **Types `PageBoxes`, `PageBoxKind`, and the `PAGE_BOX_KINDS` constant.**
599
+
600
+ ## [0.72.0] - 2026-06-24
601
+
602
+ Fidelity release focused on text extraction and AcroForm rendering on dense
603
+ government forms (CERFA). The public API is additive — existing behaviour is
604
+ unchanged except where noted as a fix.
605
+
606
+ ### Added
607
+
608
+ - **`FormField` now surfaces its text-formatting metadata.** Each field exposes
609
+ `comb` (the `/Ff` comb flag for fixed-pitch character cells), `quadding` (the
610
+ `/Q` justification: 0 left, 1 centre, 2 right), and the default-appearance font
611
+ and size parsed from the field's `/DA` string as `daFont` / `daSize`. This lets
612
+ a host reproduce a field's intended layout (combed cells, alignment, font
613
+ metrics) without re-parsing the appearance stream.
614
+
615
+ ### Fixed
616
+
617
+ - **Spurious in-word spaces during text extraction.** A new gap-aware
618
+ `runs_join` helper now drives all four reconstruction paths (lines,
619
+ paragraphs, lists, tables): a word split across several font runs no longer
620
+ emits a phantom space at each run boundary (e.g. `ENFANT S` is reassembled as
621
+ `ENFANTS`). Spacing is decided from the real inter-run gap, not the mere fact
622
+ that the text changed font.
623
+ - **Form-field appearances double-rendered behind the editable text.** A
624
+ `widget_appearances` flag makes `renderPageNoText` / `renderPageExcluding`
625
+ omit the `/AP` appearance streams of AcroForm widgets, so a filled field's
626
+ baked-in value no longer shows through underneath the live, editable overlay.
627
+ - **Borderless prose misdetected as a table.** A `line_has_gutter` guard now
628
+ requires a real inter-cell gutter before promoting a borderless block to a
629
+ table: a two-run-per-line prose notice is kept as prose, while genuine tables
630
+ (wide column gutters) are still recognised.
631
+
7
632
  ## [0.71.1] - 2026-06-23
8
633
 
9
634
  Documentation-only patch. No code changes — the WASM blob is byte-for-byte