Skip to main content
Glama

PDF-Tools MCP Server

by Theorhd

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

NameRequiredDescriptionDefault
html_contentYesHTML content to convert to PDF
optionsNoPDF generation options
output_dirNoOutput directory (optional, defaults to Downloads)/root/Downloads
output_filenameYesName 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" }

Other Tools from PDF-Tools MCP Server

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/Theorhd/Pdftools-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server