@qrcommunication/gigapdf-lib 0.55.1 → 0.56.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,19 @@ 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.56.0] - 2026-06-21
8
+
9
+ ### Added
10
+
11
+ - **`renderPageNoText(page, scale?)` — text-free page raster.** Rasterise a page to
12
+ PNG **without** its page-content text (glyphs from `Tj`/`'`/`"`/`TJ` are suppressed)
13
+ while every non-text element — vectors, gradients/shadings, images and patterns —
14
+ plus annotation/widget appearances are rendered in full. Built for editors that
15
+ overlay real, editable text on top of a text-free background. Native rasteriser, no
16
+ third-party image library. New ABI `gp_render_page_no_text(handle, page, scale,
17
+ out_len)` and core `Document::render_page_no_text`, alongside the existing
18
+ `renderPage` / `gp_render_page`.
19
+
7
20
  ## [0.55.1] - 2026-06-21
8
21
 
9
22
  ### Fixed
package/README.md CHANGED
@@ -276,7 +276,9 @@ Or call `GigaPdfEngine.load(bytes)` with bytes you read yourself.
276
276
  `addImage` (PNG/JPEG, alpha + opacity)), pages (`rotatePage`, `deletePage`,
277
277
  `movePage`, `appendPages`, `extractPages`, `resizePage`, `addPage`, `copyPage`,
278
278
  `pageInfo`),
279
- `renderPage`, fonts (base-14 `addStandardText`, embed **any** TrueType/OpenType
279
+ `renderPage` (and `renderPageNoText` — a text-free background for editors that
280
+ overlay real editable text; vectors/gradients/images/annotations still rendered),
281
+ fonts (base-14 `addStandardText`, embed **any** TrueType/OpenType
280
282
  via `embedFont`/`addText`, font-aware editing `replaceText`,
281
283
  the document's own faces `embeddedFonts`/`extractFont`, `neededFonts`),
282
284
  conversions (`toText/Html/Docx/Pptx/Odp/Odt/Xlsx/Ods/Rtf/PdfA`, plus
package/dist/index.cjs CHANGED
@@ -1238,6 +1238,16 @@ var GigaPdfDoc = class {
1238
1238
  renderPage(page, scale = 1) {
1239
1239
  return this.g._buffer((o) => this.ex().gp_render_page(this.h, page, scale, o));
1240
1240
  }
1241
+ /**
1242
+ * Rasterize a page to a PNG **without the page content stream's text** — glyphs
1243
+ * are suppressed while gradients, shadings, images, vectors and patterns are
1244
+ * preserved. Annotation/widget appearances are still painted in full. Use this
1245
+ * to paint a text-free raster background the editor can overlay real, editable
1246
+ * text on top of.
1247
+ */
1248
+ renderPageNoText(page, scale = 1) {
1249
+ return this.g._buffer((o) => this.ex().gp_render_page_no_text(this.h, page, scale, o));
1250
+ }
1241
1251
  // fonts — embed a downloaded font, then add real selectable text
1242
1252
  /**
1243
1253
  * Embed an outline font program as a Type0 font and return its object number