Render Markdown to PDF
render_pdfTurn a Markdown document into a PDF and return the PDF. Each successful render counts as one document. Re-sending the same document with the same idempotency key returns the same PDF and is not counted again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | The page settings, as the front matter page: key takes them. Each key wins over the older flat key of the same setting and over the front matter. Placeholders in header, footer and numbering texts: {page}, {pages} (the number of the last page), {title}, {author}. | |
| sign | No | Seal the PDF with your own certificate: {certificate: "name"} for a certificate stored on the account, or {p12, password} or {key, cert} to send one with the request. Optional reason, location and contact, up to 200 characters each. true is refused: name a stored certificate or send one with the request. false leaves the PDF unsealed. Sealing needs a paid plan. | |
| width | No | Older spelling of page.size, with height. The page width as a length such as 210mm; a number alone is in points. | |
| footer | No | Older spelling of page.footer, which wins over it. | |
| format | No | Older spelling of page.size, which wins over it. A paper name such as A4 or A5 landscape. It wins over width and height. | |
| header | No | Older spelling of page.header, which wins over it. | |
| height | No | Older spelling of page.size, with width. The page height, written as width is. | |
| margin | No | Older spelling of page.margin, which wins over it. A number alone is in points. | |
| output | No | How the PDF comes back. resource: in the result. upload: sent to upload_url, and the result is a receipt with the page count, size and hash. | resource |
| features | No | Optional switches for Markdown features: Mermaid diagrams, diagram pages, syntax highlighting, images, smart typography, task lists, emoji, math, barcodes, SVG, HTML blocks, bare links, indented code, the source attachment, hyphenation, the theme and the PDF standards: archive, accessible, mathml and standards. Every switch is on unless you set it to false, except diagram pages, the source attachment, archive, accessible and mathml, which are off unless you set them to true; the theme is light unless you set it to dark; standards is best_effort unless you set it to strict. | |
| filename | No | A file name for the PDF, such as report.pdf. The result returns it, cleaned of characters a file name cannot hold, to save the PDF under. A document without a front matter title takes it, without .pdf, as its PDF title. | |
| language | No | The document's language as a tag such as en-GB. It sets the hyphenation rules, and the PDF records it as its document language. Omit it to use the language set in the document's front matter, if there is one. | |
| markdown | Yes | The Markdown text of the document. | |
| papersize | No | Older spelling of page.size, as in Quarto. format wins when both are set. | |
| resources | No | What to do when an image or other linked file cannot be fetched. strict: the render fails. lenient: the PDF shows a placeholder box in its place. | |
| upload_url | No | A pre-signed https URL on your own storage to upload the PDF to. Needed with output upload, and refused with any other output. | |
| page_numbering | No | Older spelling of page.numbering, which wins over it: a text, a style 1, a, A, i or I, true for the default, or false. | |
| idempotency_key | No | A per-document idempotency key. Reuse it only for the same document and options. |