Render HTML to PDF
html_to_pdfRender HTML to a PDF with JavaScript and network access turned off, so only the HTML sent is used and images must be inline data URLs. options can set page-size (A3, A4, A5, Letter, Legal, Tabloid), orientation (Portrait, Landscape) and margin-top, margin-bottom, margin-left, margin-right such as 10mm. The PDF is stored for 24 hours: the answer has storage_id and storage_url, and read_stored_file returns the file. No API key, no account and no sign up.
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": {
"html": "<html>"
},
"name": "html_to_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | The complete HTML to render. Scripts and network requests are off, so images must be inline data URLs. | |
| options | No | Optional page settings: page-size (A3, A4, A5, Letter, Legal, Tabloid), orientation (Portrait, Landscape) and margin-top, margin-bottom, margin-left, margin-right such as 10mm. |