Markdown to branded PDF report
End-to-end walkthrough — Markdown input, report template, full branding, warning handling.
This example walks through a complete integration: take a Markdown string, apply the report template with full branding, handle warnings, and download the PDF.
What you'll build
A function that:
- Sends Markdown to Paperbase with a branded theme
- Logs any warnings with their fix suggestions
- Returns a signed URL to the finished PDF
Prerequisites
Implementation
Calling the function
What the report template renders
The report template automatically:
- Generates a full-bleed branded cover page from the first
# h1heading - Inserts a clickable table of contents from
## h2headings - Styles an Executive Summary section if that heading is present
- Moves an Appendix section to the back matter
- Applies your theme (logo, colors, fonts) to every page
See the Report template reference for the full list of recognized headings.
Self-healing with warning feedback
If you're building an agentic pipeline, use warnings to self-correct on the next run:
Related
- Report template — full template reference
- Theming — all theme fields and their effects
- Errors & warnings — warning shape and how to act on it
- Authentication — key types and quota