PDF Generator
Generate styled PDF documents from structured JSON data using ReportLab.
Quick Start
python scripts/generate_pdf.py --output report.pdf --data '{
"title": "Monthly Report",
"subtitle": "March 2026",
"author": "PragDev",
"sections": [
{"type": "text", "text": "Introduction text here."},
{"type": "highlight", "text": "Key metric: +15%"},
{"type": "list", "items": ["Item 1", "Item 2"]}
]
}'
JSON Schema Reference
See references/schema.md for complete schema documentation.
Output
- PDF saved to path specified by
--outputordata.output - Default:
output.pdfin current directory
Tips
- Use
accent_colorandheader_colorfor brand colors - Tables auto-alternate row backgrounds
- Images must exist at the specified path
- Page breaks create new pages