@reportwright/viewer 0.11.0 → 0.12.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
@@ -2,6 +2,33 @@
2
2
 
3
3
  All `@reportwright/*` packages (formerly `@pagewrightjs/*`) share one version. The versioning policy is in [CONTRIBUTING.md](CONTRIBUTING.md#versioning-semver).
4
4
 
5
+ ## 0.12.0 — 2026-10-09
6
+
7
+ Streaming PDF: very large reports are written page by page, with flat memory.
8
+
9
+ ### Added
10
+ - **`exportPdfStream(definition, options, sink)`** in `@reportwright/engine`: a report whose body is a flowing table
11
+ (plain or grouped: repeating group headers, subtotals, `RowNumber()`, widow control, keep-together, page breaks) is laid
12
+ out a window of rows at a time and each finished page goes straight to the sink. Peak memory stays flat: about 260 MB
13
+ for the whole render process from 20,000 to 100,000 rows (projected about 250–275 MB at 1,000,000).
14
+ "Page N of M" and footer totals work (a counting pass first). PDF/A-2b, PDF/UA-1 and PDF/A-2a + PDF/UA-1 stream too
15
+ (veraPDF passes). Anything else (images, charts, matrices, rich text, subreports, signing, encryption) falls back to
16
+ `exportPdf`, with the same output.
17
+ - **The server streams large PDFs** (`/api/reports/<id>/pdf`, `/api/v1/render`) with the same row caps, deadline, stall
18
+ timeout and abort handling as the CSV/Excel streaming; the viewer's large-report button gets the streamed file.
19
+ - **`parallel: N`** (Node, opt-in): page ranges painted on worker threads, byte-identical to the serial file. Measure on
20
+ your hardware before relying on it; each worker costs about 150 MB.
21
+ - `examples/stream-1m.mjs` in the engine package: streams a generated million-row ledger to a file and prints peak memory.
22
+ - `planPaged` exported for custom pipelines.
23
+
24
+ ### Changed
25
+ - The PDF painter is shared between `exportPdf` and the streaming writer; `exportPdf` output is byte-for-byte unchanged.
26
+ - The engine package ships its readable bundle without a source map (1.3 MB unpacked).
27
+
28
+ ### Known limits
29
+ - In the npm engine, grouped reports sort rows in memory (the server spills them to disk), so a 1M-row grouped report is
30
+ not flat outside the server yet.
31
+
5
32
  ## 0.11.0 — 2026-10-08
6
33
 
7
34
  Everything since 0.10.0. Items marked **Behaviour change** alter output that a pixel-locked layout or a locale-sensitive