HTML to PDF
document.pdf.from_htmlGenerate PDF documents from HTML content using headless Chrome—renders CSS, JavaScript, custom page size, margins, and headers. Provides a temporary download link.
Instructions
Convert HTML content to a PDF document using headless Chrome — full CSS + JavaScript rendering, custom page size, margins, headers/footers, background colors. Returns a temporary download URL for the generated PDF (API2PDF)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | HTML content to convert to PDF (full document or fragment, e.g. "<h1>Report</h1><p>Content here</p>") | |
| fileName | No | Output filename (e.g. "report.pdf") | |
| options | No | PDF rendering options (page size, margins, header/footer) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. | |
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. |