Convert an HTML file to PDF with Chromium
html_to_pdfConvert an HTML document up to 4 MB to a PDF with Chromium (Gotenberg).
Pass the HTML as base64 in content_base64, or as a download link in
file. JavaScript runs, and images, fonts and CSS the HTML links by
public https URL are loaded. Returns {"download_url": "<link>", "size_bytes": <PDF size>, "expires_in_minutes": 60}: give the user the
download_url. Requires an API key.
Credits: 1 per call.
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 |
|---|---|---|---|
| file | No | The file as a download link, instead of `content_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL. | |
| content_base64 | No | The file, base64-encoded. Up to 4 MB before encoding. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||