Back to Decisions
Report generation: PDF via Puppeteer vs. dedicated reporting lib
AcceptedKatja Vogel2024-03-05
reportingpdfinfrastructure
Context
Why this decision needed to be made
GRI-compliant sustainability reports require precise formatting, tables, charts, and branded cover pages. Need to choose the PDF generation approach.
Options Considered
Comparison of available options
| Option | Pros | Cons | Chosen |
|---|---|---|---|
Puppeteer (headless Chrome)Selected |
|
| |
PDFKit / React-PDF |
|
| — |
Outcome
What was decided
Puppeteer headless Chrome for GRI report generation
Rationale
Why this option was chosen
GRI reports require complex multi-column layouts, embedded charts, and precise formatting that is difficult to achieve with code-based PDF libraries. Puppeteer lets us design the report template as a web page and print it — the same fidelity we'd need for a GRI-certified output. Memory footprint is acceptable on a dedicated report worker.
Linked Requirements
Requirements affected by this decision
Referenced Files
Documents related to this decision