printFile
Prints local files to a printer by auto-selecting PDF, HTML, or image handling based on file extension; supports dry-run preview before actual printing.
Instructions
打印本机文件:按扩展名自动选择 PDF / HTML / 图片通道。默认出纸;dry_run: true 只预览
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "printFile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 本机文件路径,绝对路径或相对当前工作目录 | |
| copies | No | 便捷参数:份数 | |
| dry_run | No | false(默认)= 真正出纸;true = 只渲染预览。显式 extra_options.action 优先于本项 | |
| pdf_options | No | PDF 排版选项(字段与客户端 pdfOptions 白名单一致,未知字段会报错) | |
| paper_format | No | 便捷参数:纸张名。标准纸名会同时写入 pdf_options.paperFormat 与 print_options.paperFormat;其它纸名只写后者 | |
| printer_name | No | 便捷参数:打印机名,留空用系统默认打印机 | |
| extra_options | No | 额外选项:action/requestTimeout/cookies/httpHeaders/localStorages/sessionStorages,以及任意自定义键(会原样返回) | |
| print_options | No | 打印机选项(字段与客户端 printOptions 白名单一致,未知字段会报错) |