Turn Markdown into a PDF
markdown_to_pdfTurns a Markdown document into a PDF without a template, e.g. a report, notes or an answer you wrote, and returns the render with status and download_url. It reads GitHub Flavored Markdown (tables, task lists, strikethrough) and footnotes; a YAML front matter block gives the title, author, subject and keywords, else the first heading is the title; a line \newpage starts a new page. Raw HTML in the text is shown as text. A picture named without an address (
) is a file of the workspace library, uploaded in Formfeed; a picture can also be a data:image URI. The headings become the PDF bookmarks by default, and pdf_ua checks the file against PDF/UA-1 before it is delivered. To fill a template with data, use render; to convert an office file, use convert_to_pdf. Every call is a new render: one unit per started five pages on a live key or for a signed-in agent, free with a test key; every plan.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"markdown": "<markdown>"
},
"name": "markdown_to_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | A stylesheet after the theme, e.g. h1 { color: #0f766e }; the document is inside div.ff-markdown | |
| wait | No | true waits for a render that continues in the background; false returns it as it is, to check later with get_render | |
| paper | No | Paper size; A4 when left out | |
| theme | No | document (default) styles the text, in the brand kit fonts and colour where the workspace has one; none leaves the styling to css | |
| title | No | The PDF title; left out, the front matter title or the first heading | |
| pdf_ua | No | Makes the file a PDF/UA-1 document checked by veraPDF; a file that fails is not delivered and the result names the rules | |
| outline | No | Bookmarks from the headings (default true); they cost nothing | |
| filename | No | Name of the PDF behind download_url, e.g. report.pdf | |
| markdown | Yes | The document as Markdown text, up to 1 MB | |
| landscape | No | Landscape pages |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | rnd_ id of the render | |
| form | No | What fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran | |
| pdfa | No | The PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it | |
| error | Yes | Why a failed render failed | |
| units | Yes | Units the render counted | |
| output | No | The format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image | |
| status | Yes | ||
| einvoice | No | The e-invoice report, when the render made one | |
| template | Yes | The template and version rendered; null for html and conversions | |
| expires_at | Yes | When download_url stops working; get_render issues a fresh one | |
| page_count | Yes | ||
| environment | Yes | ||
| download_url | Yes | Signed link to the file; null until the render succeeded | |
| accessibility | No | The PDF/UA-1 verdict, when the template declares it |