HTML to PDF
html_to_pdfUse to produce a real, full-quality PDF from HTML (reports, receipts, letters). Inputs: "html" (required), "format" (A4|Letter|Legal|A3|A5), "landscape", "margin" (CSS length), "filename". Rendered by headless Chromium with JavaScript disabled; only data: URIs and public https assets load; Chinese text supported. Output: the PDF as an embedded base64 resource plus pages, bytes and remaining quota. Requires "Authorization: Bearer " (or "sandbox" for a watermarked 1-page trial, 5/day). Without a usable key it returns a 402 payment_required result with buy links. Cost: 1 document from your monthly plan (free key: 100/month), or 1 prepaid credit after the cap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Full HTML document or fragment. | |
| format | No | A4 | |
| margin | No | CSS length, e.g. 12mm | 12mm |
| filename | No | document.pdf | |
| landscape | No |