@qrcommunication/gigapdf-lib 0.107.2 → 0.109.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
@@ -6,6 +6,25 @@ project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.109.0] - 2026-06-30
10
+
11
+ ### Added — image conversion completeness
12
+
13
+ - `imageToPdf` and direct image embedding now accept the full format set
14
+ uniformly: **PNG, JPEG, GIF, WebP, AVIF and TIFF**. AVIF works for direct
15
+ embedding (`addImage` / watermark) and TIFF works for `imageToPdf` — closing
16
+ the gaps where one entry point supported a format the other rejected.
17
+ - New `image_conversion.test.ts` suite exercises every format → PDF through the
18
+ bundled production WASM binary (PNG, WebP, AVIF, TIFF), the non-image rejection
19
+ path, and `addImage`.
20
+
21
+ ### Added — conversion fidelity (both directions)
22
+
23
+ - HTML `letter-spacing`, `visibility:hidden`/`display:none`, `<sup>`/`<sub>` and
24
+ `<colgroup><col width>`; Markdown inline `<sup>`/`<sub>`; ODT/DOCX tab stops;
25
+ RTF `\page` page breaks — all now round-trip through the model. See the engine
26
+ [`CHANGELOG.md`](../CHANGELOG.md) for the full list.
27
+
9
28
  ## [0.107.1] - 2026-06-27
10
29
 
11
30
  ### Fixed
package/dist/index.cjs CHANGED
@@ -398,11 +398,12 @@ var GigaPdfEngine = class _GigaPdfEngine {
398
398
  );
399
399
  }
400
400
  /**
401
- * Image (PNG/JPEG/GIF/WebP/AVIF) → one-page PDF, format auto-detected: the
402
- * image is centred and scaled to fit on an A4 portrait page. PNG/JPEG embed
403
- * directly; GIF/WebP/AVIF are transcoded to PNG first — all in pure Rust/WASM,
404
- * no third-party image library. Empty array if the bytes are not a recognized
405
- * image. To combine many images into a single document, pipe each result
401
+ * Image (PNG/JPEG/GIF/WebP/AVIF/TIFF) → one-page PDF, format auto-detected:
402
+ * the image is centred and scaled to fit on an A4 portrait page. PNG/JPEG
403
+ * embed directly; GIF/WebP/AVIF/TIFF are transcoded to PNG first — all in pure
404
+ * Rust/WASM, no third-party image library. Empty array if the bytes are not a
405
+ * recognized image. To combine many images into a single document, pipe each
406
+ * result
406
407
  * through {@link mergePdfs}.
407
408
  */
408
409
  imageToPdf(image) {
@@ -1629,8 +1630,10 @@ var GigaPdfDoc = class {
1629
1630
  ) === 0;
1630
1631
  }
1631
1632
  /**
1632
- * Embed a raster image (PNG or JPEG bytes) at `(x,y)` sized `(w,h)` in PDF
1633
- * user space. PNG alpha is honoured; `opacity` (0..1) sets an overall alpha.
1633
+ * Embed a raster image at `(x,y)` sized `(w,h)` in PDF user space. Format
1634
+ * auto-detected: **PNG, JPEG, GIF, WebP, AVIF, TIFF** (non-PNG/JPEG decoded to
1635
+ * RGBA in pure Rust/WASM). PNG alpha is honoured; `opacity` (0..1) sets an
1636
+ * overall alpha.
1634
1637
  */
1635
1638
  addImage(page, data, x, y, w, h, opacity = 1) {
1636
1639
  return this.g._withBytes(
@@ -1661,7 +1664,7 @@ var GigaPdfDoc = class {
1661
1664
  }
1662
1665
  /**
1663
1666
  * Stamp an **image watermark** across pages from raw image bytes. Accepts the
1664
- * same five formats the engine decodes — **PNG, JPEG, WebP, GIF, AVIF**. The
1667
+ * formats the engine decodes — **PNG, JPEG, WebP, GIF, AVIF, TIFF**. The
1665
1668
  * image is embedded **once** and referenced on every target page.
1666
1669
  *
1667
1670
  * `opts.pages` is a list of 1-based page numbers; omit it (or pass `[]`) to