HTML to PDF
html_to_pdfHTML to PDF. Renders HTML into a PDF (invoices, reports, tickets, contracts). Same rendering engine as /capture: inline CSS, web fonts and images allowed, no JavaScript. Send either html, or template + data (the "invoice" template works well as a PDF).
Costs 1 credit per call.
Returns a temporary download link (valid 15 minutes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Texts for the template, e.g. { "name": "Jane Doe", "course": "n8n basics" } for "certificate". Plain text only: everything is escaped. Fields you leave out keep the example text. | |
| html | No | The HTML to render (max 5 MB). Required unless you use template. | |
| lang | No | Language of the example texts of the template. | en |
| scale | No | Content scale factor (0.1-2). Default 1; use a value below 1 to fit more on each page. | |
| format | No | Paper size. | A4 |
| margin | No | Margin in millimetres, same on all four sides. | |
| template | No | Use one of our ready-made designs instead of sending html. Fields, example texts and sizes: https://cofferdock.com/templates.json | |
| landscape | No | true = landscape page, false (default) = portrait. | |
| print_background | No | Print background colours and images. |