generate_pdf_from_text
Convert plain text content into PDF documents with customizable formatting options including fonts, margins, and file naming.
Instructions
Generate a PDF from plain text using PDFKit
Input Schema
Name | Required | Description | Default |
---|---|---|---|
options | No | PDF formatting options | |
output_dir | No | Output directory (optional, defaults to Downloads) | /root/Downloads |
output_filename | Yes | Name of the output PDF file (without path) | |
text_content | Yes | Text content to convert to PDF |
Input Schema (JSON Schema)
{
"properties": {
"options": {
"description": "PDF formatting options",
"properties": {
"font": {
"default": "Helvetica",
"type": "string"
},
"fontSize": {
"default": 12,
"type": "number"
},
"margins": {
"properties": {
"bottom": {
"default": 50,
"type": "number"
},
"left": {
"default": 50,
"type": "number"
},
"right": {
"default": 50,
"type": "number"
},
"top": {
"default": 50,
"type": "number"
}
},
"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"
},
"text_content": {
"description": "Text content to convert to PDF",
"type": "string"
}
},
"required": [
"text_content",
"output_filename"
],
"type": "object"
}