Html to pdf
html_to_pdfConvert raw HTML markup into a print-ready base64 PDF via hermetic sandboxed headless Chrome (no external network requests). $0.003 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for terms, then call again with payment.
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 | HTML markup to render into PDF (up to 512 KB; inline CSS and data: URIs supported). | |
| format | No | Optional paper format: A4 (default), Letter, Legal, Tabloid, A3, or A5. | |
| margin | No | Optional margin preset: none, compact, normal (default), or wide. | |
| payment | No | signed x402 payment payload (PAYMENT-SIGNATURE). | |
| landscape | No | Optional: render landscape orientation when true (default false). | |
| printBackground | No | Optional: print CSS backgrounds (default true). |