markdown_to_pdf
Convert Markdown documents into styled PDF files. Choose a preset theme or custom JSON settings, add a title, and get a formatted PDF with support for headings, tables, code, and local images.
Instructions
Convert Markdown into a styled PDF file and return the path written.
Pass the document either as markdown text or as input_path pointing at a
.md file (exactly one of the two). output_path is where the PDF is written.
theme is a preset name ("default", "compact", "academic") or a path to a
JSON file overriding theme keys such as margin_cm, accent, font_size_pt or
heading_numbering. title adds a centred title block above the content.
Supports headings, emphasis, links, lists, blockquotes, fenced code, tables, rules and local images (resolved relative to the input file). Remote image URLs are not fetched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| theme | No | default | |
| title | No | ||
| markdown | No | ||
| input_path | No | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |