PDF 导出
🌐 PDF Export
将当前页面保存为 PDF 文件。需要 pdf 功能。
🌐 Save the current page as a PDF file. Requires the pdf capability.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--caps=pdf"]
}
}
}
browser_pdf_save
将当前页面保存为 PDF 文件。PDF 会被保存到输出目录。
🌐 Save the current page as a PDF file. The PDF is saved to the output directory.
→ browser_pdf_save
PDF saved to: /output/page-2024-03-15.pdf
note
PDF 导出需要配置中显示的 pdf 功能。
使用案例
🌐 Use cases
- 保存来自网页应用的收据或发票
- 将网页归档以便离线查看
- 从仪表板生成报告
- 从渲染的 HTML 创建文档