browser_save_as_pdf
Convert and save the current browser page as a PDF with customizable options like format, margin, and filename. Ideal for automation, testing, or generating printable content from advanced websites.
Instructions
Save the current page as a PDF
Args:
outputPath: The path to save the PDF to - required
filename: The name of the PDF file - optional, default is "page.pdf"
format: The format of the PDF - optional, default is "A4" (e.g. "A4", "LETTER", "LEGAL", "TABLOID")
printBackground: Whether to print the background - optional, default is True
margin: The margin of the PDF - optional, default is None (e.g. {"top": "1cm", "right": "1cm", "bottom": "1cm", "left": "1cm"})
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filename | No | page.pdf | |
format | No | A4 | |
margin | No | ||
outputPath | Yes | ||
printBackground | No |
Input Schema (JSON Schema)
{
"properties": {
"filename": {
"default": "page.pdf",
"title": "Filename",
"type": "string"
},
"format": {
"default": "A4",
"title": "Format",
"type": "string"
},
"margin": {
"additionalProperties": true,
"default": null,
"title": "Margin",
"type": "object"
},
"outputPath": {
"title": "Outputpath",
"type": "string"
},
"printBackground": {
"default": true,
"title": "Printbackground",
"type": "boolean"
}
},
"required": [
"outputPath"
],
"title": "browser_save_as_pdfArguments",
"type": "object"
}