print_pdf
Save the current Electron page as a PDF, with optional background printing and landscape orientation; falls back to webContents printing when Page.printToPDF is unavailable.
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 |