Dokaz API › Docs › Markdown to PDF
Markdown to PDF API
Reports, release notes, statements of work and generated documentation are easiest to write in Markdown and easiest to send as PDF. POST the Markdown and get the PDF bytes back - no headless browser, no template to maintain.
Headings, paragraphs, bullet and numbered lists, bold, italic, inline code and fenced code blocks are laid out with real font metrics and paginated with page numbers. Links print as their text followed by the URL, because paper cannot be clicked.
Request
curl -X POST https://api.dokaz.net/v1/pdf/markdown \
-H "content-type: application/json" \
-d '{"title":"Weekly report","page_size":"a4","markdown":"# Summary\n\nRevenue is **up 12%** on last week.\n\n- 3 new customers\n- `v2.4` shipped\n\nDetails: [dashboard](https://example.com/dash)"}'
curl -X POST https://api.dokaz.net/v1/pdf/markdown \
-H "content-type: application/json" \
-d '{"markdown":"# Hello\n\nFrom **Markdown**."}' -o hello.pdf
The response is application/pdf with x-pdf-pages giving the page count. The body limit is 200 KB.
Pricing
100 calls a day are free with no key. Need more? Starter is $9/month for 10,000 calls across every product, key issued instantly.
Questions
Which Markdown is supported?
Headings (# to ######), paragraphs, bullet and numbered lists, bold, italic, inline code, fenced code blocks and links. Tables, images and blockquotes print as their literal text.
What about non-English text?
Latin-1 and Windows-1252 characters (accents, curly quotes, dashes, the euro sign) print as themselves. Other scripts print as "?" - the PDF uses the standard fonts every reader has, which keeps files small and rendering instant.