render_template
Generate a PDF from a DocRenders template by passing structured data. The template provides layout and styling.
Instructions
Generate a PDF from a DocRenders template by passing structured data. The template provides the document layout and styling. Use list_templates to see available templates and their required fields, or get_template for a specific template's schema.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | Yes | Template name (e.g. "invoice", "resume"). Use list_templates to see all available templates. | |
| data | Yes | Data fields for the template. Required and optional fields vary by template — call get_template to see the schema. | |
| filename | No | Name of the stored PDF file (e.g. "invoice-123.pdf"). Defaults to "render.pdf". | |
| format | No | Page size | A4 |
| landscape | No | Landscape orientation | |
| margin_top | No | Top margin as a CSS length (e.g. "1in", "20mm"). Defaults to "1in". | |
| margin_right | No | Right margin. Defaults to "1in". | |
| margin_bottom | No | Bottom margin. Defaults to "1in". | |
| margin_left | No | Left margin. Defaults to "1in". |