Skip to main content
Glama

document.pdf.from_html

Convert HTML content to PDF documents with full CSS and JavaScript rendering. Customize page size, margins, headers, and footers, then receive a temporary download URL for the generated PDF file.

Instructions

Convert HTML content to a PDF document using headless Chrome — full CSS + JavaScript rendering, custom page size, margins, headers/footers, background colors. Returns a temporary download URL for the generated PDF (API2PDF)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesHTML content to convert to PDF (full document or fragment, e.g. "<h1>Report</h1><p>Content here</p>")
fileNameNoOutput filename (e.g. "report.pdf")
optionsNoPDF rendering options (page size, margins, header/footer)
Install Server

Other Tools

Latest Blog Posts

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/whiteknightonhorse/APIbase'

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