Render HTML or URL to PDF
html_to_pdfRender raw HTML/CSS markup or a public HTTP/HTTPS webpage URL into a print-ready PDF document using headless Chromium. Provide either html or url. Returns JSON containing content_type, size_bytes, and base64-encoded PDF bytes. Cost: 2 credits.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "html_to_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http:// or https:// webpage URL to convert to PDF (provide this or html). | |
| html | No | Raw HTML markup to render into a PDF (provide this or url). | |
| landscape | No | Set true to render PDF pages in landscape orientation. |