pdf_create_from_template
Create a polished PDF by populating a named template (invoice, report, or letter) with structured data that is validated against the template's schema.
Instructions
Create a polished PDF from a named template (invoice, report, or letter). Pass structured data matching the template's fields; data is validated against the template's schema.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| templateName | Yes | Template to use: invoice, report, or letter | |
| data | Yes | Template data. Invoice: companyName, clientName, invoiceNumber, invoiceDate, items[{description, quantity, unitPrice}], taxRate, currency (ISO code or symbol, default USD), dueDate, notes, paymentTerms. Report: title, author, date, subtitle, sections[{heading, body}]. Letter: senderName, senderAddress, recipientName, recipientAddress, subject, body, closing, signatureName. | |
| outputPath | Yes | Absolute path for the output PDF file |