playwright_save_as_pdf
Convert the current webpage into a PDF file with customizable settings like page format, margins, and background graphics. Ideal for saving or sharing web content in a printable format.
Instructions
Save the current page as a PDF file
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filename | No | Name of the PDF file (default: page.pdf) | |
format | No | Page format (e.g. 'A4', 'Letter') | |
margin | No | Page margins | |
outputPath | Yes | Directory path where PDF will be saved | |
printBackground | No | Whether to print background graphics |
Input Schema (JSON Schema)
{
"properties": {
"filename": {
"description": "Name of the PDF file (default: page.pdf)",
"type": "string"
},
"format": {
"description": "Page format (e.g. 'A4', 'Letter')",
"type": "string"
},
"margin": {
"description": "Page margins",
"properties": {
"bottom": {
"type": "string"
},
"left": {
"type": "string"
},
"right": {
"type": "string"
},
"top": {
"type": "string"
}
},
"type": "object"
},
"outputPath": {
"description": "Directory path where PDF will be saved",
"type": "string"
},
"printBackground": {
"description": "Whether to print background graphics",
"type": "boolean"
}
},
"required": [
"outputPath"
],
"type": "object"
}