Skip to main content
Status: Accepted Decision date: 2025-08-01 Implementation: Confirmed in the repository at commit 27045ec.

Context and decision drivers

The report combines client branding, device details, calculated temperature metrics, alarm information, and a chart. The layout must be customizable to a client’s design system. The service already uses Chromium for portal automation.

Options considered

Decision and rationale

Build the report as HTML and CSS, then render it to PDF with Puppeteer. This gives the team direct control over the report layout without adding a separate PDF-generation service.

Consequences

  • Report styling can be changed in the HTML template.
  • PDF output depends on Chromium and assets used by the template.
  • Layout changes need visual checks against representative reports.
  • The current template references a public CSS CDN, whose availability may affect rendering.

Implementation evidence

The report template builds the HTML. The report service renders it as a PDF.

Revisit when

Reconsider this approach if report design needs exceed the template’s capabilities or Chromium packaging and resource use become unacceptable.