print_pdf
Converts an Electron page to a PDF file using Chrome DevTools or a webContents fallback, with background printing enabled by default and the result registered as an artifact.
Instructions
Write the page to a PDF. Uses Page.printToPDF, and falls back to webContents.printToPDF when that method is missing (needs inspectMain). printBackground defaults to true. Also registers as an artifact 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": "print_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| targetId | No | ||
| landscape | No | ||
| processId | No | Process ID. If omitted, uses the single running app. | |
| printBackground | No |