xtract.bot
POST /api/markdown-to-pdf

Render a Markdown document to PDF. Headings, lists, tables, code blocks, and images are styled with a sensible default theme. A4 / Letter page size.

Renders Markdown source to a PDF document with a sensible default theme (proportional body font, monospace code blocks, visible page numbers). Common Markdown features are supported: ATX and Setext headings, ordered and unordered lists (including nested), GFM tables, fenced code blocks with syntax highlighting, inline emphasis, and links. Page size is configurable (`A4` default, also `Letter`, `Legal`, etc.) and so is margin.

Inputs

NameTypeDefaultDescription
markdown*stringMarkdown source as UTF-8 text.
pageSizeenum (A4 | LETTER | LEGAL | A3 | A5)"A4"Page size.
marginnumber (0…200)40Page margin in points (1 pt = 1/72 inch). Same on all four sides.
fontSizenumber (6…24)11Base font size for body text in points. Headings scale relative to this.

Response

Modes: binary, base64-json. Cache: yes (24h TTL).