Spec the PDF renderer behind report exports
Your task
People export reports from your Node and TypeScript app as PDFs, with tables, charts and page breaks. Some reports run to 200 pages, and at month end hundreds of people export at once. The team picked headless Chromium through Puppeteer, because the charts are already HTML and CSS. An agent will build the render service.
Write the spec you would hand the agent.
What you know:
- each report has a print page at
/reports/:id/print, behind login - report titles, notes and table cells hold text that users typed
- the service runs in containers with 2 GB of memory
- finished PDFs go to S3, and users get a download link
Then, in a few sentences: what does "generate a PDF from this HTML" get wrong in production?