Reports
Operational and financial reports are usually generated from your own systems — the data is trusted — and benefit from browser-quality rendering: charts, tables, and multi-page layout.
Why PDF Server fits
- Charts and async content. Draw with a JS charting library and print when ready using the
callbacklifecycle event. - Long documents. Page breaks, repeating headers/footers, and page numbering.
- Compositions. Assemble a cover page + sections + an appendix into one PDF with a composition — including a fixed raw PDF cover.
- Trusted data relaxes the data-driven security concerns (though network and DoS controls still apply).
Shape
compositions/monthly-report/
composition.yaml # cover + per-section + appendix
templates/report-section/
template.tmpl # Go template with computed logictemplates:
- templateName: cover-page # a raw.pdf
- templateName: report-section
transform: { jq: '.summary' }
- templateName: report-section
if: { jq: '.details | length > 0' }
transform: { jq: '.details' }Preview the plan while building it:
curl -X POST -d @data.json \
https://pdf.internal/templates/composition%3Amonthly-report/preview/render-plan