Render a PDF
render_pdfRender a public web page (url) or raw HTML (html) to PDF. A url prints as it looks on a desktop screen and is scrolled through first, so content that loads or appears on scroll is in the PDF. Returns the PDF as an embedded resource.
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": "render_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) URL to print | |
| html | No | Raw HTML (max 1 MB); use instead of url | |
| delay | No | Extra wait after load, ms | |
| media | No | screen: the page as it looks on a desktop screen, scaled to fit the paper (best for landing and pricing pages). print: the page's print styles at the paper width, like a browser's Print dialog (best for articles and documents). Default: screen for url, print for html. | |
| width | No | Layout width in CSS px, scaled to fit the paper. Default: 1280 with media screen, the paper width with media print. | |
| format | No | A4 | |
| margin | No | CSS length for all sides, e.g. 10mm, 0.5in | 10mm |
| scroll | No | Scroll through the page before printing. Default true for url, false for html. | |
| landscape | No | ||
| print_background | No |