printHtmlByBase64
Convert Base64-encoded HTML into PDF for printing; enable dry_run to preview the output without sending it to a printer.
Instructions
把 Base64 编码的 HTML 渲染成 PDF 打印。默认出纸;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": {
"base64": "<base64>"
},
"name": "printHtmlByBase64"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base64 | Yes | HTML 的 base64,可带 data:text/html;base64, 前缀 | |
| 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 白名单一致,未知字段会报错) |