generate_from_markdown
Convert Markdown to PDF with support for headings, lists, tables, code blocks, and more. Returns a base64-encoded PDF file.
Instructions
Convert a Markdown string to a PDF. Supports headings, bold/italic, strikethrough, inline code, links, ordered/unordered lists (nested up to 3 levels), GFM tables (with column alignment), GFM task lists (☑/☐), blockquotes, fenced code blocks (rendered as plain indented text — not styled monospace), and horizontal rules. For richer layouts or styled code blocks, use generate_pdf instead. Returns a base64-encoded PDF.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | Markdown source to convert. Max 100,000 characters. | |
| filename | No | Suggested filename without .pdf extension. Default: document | |
| page_size | No | Page size. Default: A4. Matches the NamedPageSize union exported by pretext-pdf. | |
| font_size | No | Body font size in pt. Default: 12 |