HTML or web page to PDF
html_to_pdfTurn HTML you write (an invoice, report, letter or certificate) or a public web page into a print-quality PDF, rendered by Chrome with backgrounds and CSS. Use when you need to hand a person a polished, printable document. Send {html} or {url}; optional format (A4, Letter, A3, A5, Legal) and landscape. Returns the PDF. Errors: 400 missing input or private URL, 413 HTML over 2 MB. Price: $0.01 USDC per call (x402).
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 page to print. Provide html OR url. | |
| html | No | HTML to render. Provide html OR url. | |
| format | No | ||
| landscape | No |