Generate invoice PDF
pdf_invoiceGenerate a professional invoice PDF directly from structured invoice data—no template needed. Output can be saved to a file or returned inline.
Instructions
Generate a complete, professionally laid-out invoice PDF from structured data — no template needed. Deterministic: the same input produces byte-identical output (safe to re-run). Note: without a paid PDFops key the output carries a small "Generated with pdfops.dev" footer line. Returns the invoice written to output_path, or inline as an application/pdf resource when output_path is omitted; an existing file at output_path is overwritten. Use this when you have invoice DATA and no document; if you already have an invoice PDF or a fillable template to populate, use pdf_fill instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"invoice": "<invoice>"
},
"name": "pdf_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | Invoice data | |
| output_path | No | Absolute path to write the result. Omit when running remotely: the PDF is then returned inline as an application/pdf resource for the client to save. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | Size of the produced PDF in bytes | |
| output_path | No | Absolute path written, when output_path was supplied | |
| resource_uri | No | pdfops:// uri of the inline application/pdf resource, when output_path was omitted |