Render an HTML document to a PDF
render_pdfRender up to 256 KB of HTML to a PDF with WeasyPrint. Returns a download link.
Give the user the download_url so they can open the PDF. The link
works for 15 minutes; after that, render again. The result is
{"download_url": "<link>", "pages": <page count>, "size_bytes": <PDF size>, "expires_in_minutes": 15}.
Only HTML and CSS are rendered; JavaScript is not run.
For documents larger than 256 KB, use the REST API
(POST /v1/weasyprint/render).
Credits: 1 per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | A complete HTML document, up to 256 KB. Inline images, fonts and CSS as data: URIs; external resources are not loaded. | |
| pdf_variant | No | Write the PDF as PDF/A-2b or PDF/A-3b, for archiving. Paid plans only. Leave it out for a regular PDF. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||