html_to_pdf
documentRender a live web page (by URL) or a string of HTML into a PDF, the way a browser would draw it.
- When to use
- Archiving a web page, turning a generated HTML report or invoice into a PDF, or capturing a page that needs CSS and JavaScript to look right.
- Not for
- Converting an HTML FILE that is really just a document (convert_file handles that too, without a browser). Screenshots as images — this always produces a PDF.
- Returns
- A signed download URL for the rendered PDF.
- Runtime
- Slow — a large input can take minutes. The call is synchronous, so the request simply stays open until the file comes back.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | no | Public http(s) URL of the page to render. |
| html | string | no | Raw HTML to render, instead of a URL. |
| output_filename | string | no | Desired output filename. |
Example call
JSON-RPC tools/call body (sent to https://convertfleet.com/api/mcp):
{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "html_to_pdf", "arguments": {} }
}Connect first
curl -sN https://convertfleet.com/api/mcp \
-H "Authorization: Bearer flt_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'See the quickstarts for Hermes, Claude, Cursor, OpenClaw, n8n, Zapier and Make.