generate_pdf_from_html
Convert HTML content to PDF files with customizable formatting options and automatic saving to specified directories.
Instructions
Generate a PDF from HTML content using Puppeteer
Input Schema
Name | Required | Description | Default |
---|---|---|---|
html_content | Yes | HTML content to convert to PDF | |
options | No | PDF generation options | |
output_dir | No | Output directory (optional, defaults to Downloads) | /root/Downloads |
output_filename | Yes | Name of the output PDF file (without path) |
Input Schema (JSON Schema)
{
"properties": {
"html_content": {
"description": "HTML content to convert to PDF",
"type": "string"
},
"options": {
"description": "PDF generation options",
"properties": {
"format": {
"default": "A4",
"type": "string"
},
"margin": {
"properties": {
"bottom": {
"default": "1cm",
"type": "string"
},
"left": {
"default": "1cm",
"type": "string"
},
"right": {
"default": "1cm",
"type": "string"
},
"top": {
"default": "1cm",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"output_dir": {
"default": "/root/Downloads",
"description": "Output directory (optional, defaults to Downloads)",
"type": "string"
},
"output_filename": {
"description": "Name of the output PDF file (without path)",
"type": "string"
}
},
"required": [
"html_content",
"output_filename"
],
"type": "object"
}