Markdown to PDF — documentation-grade output
GitHub-flavored Markdown rendered with code-syntax highlighting, tables, and footnotes. Ideal for technical docs, reports, READMEs.
- Hosted in Frankfurt & Paris
- GDPR-compliant
Why convert Markdown to PDF?
Authoring-friendly source
Markdown is plain text — version-controllable, AI-generatable, easy to edit. No WYSIWYG learning curve, no proprietary file format.
Developer-grade rendering
Code blocks render with syntax highlighting (Shiki). Tables, footnotes, task lists, and admonitions all work out of the box.
Reuse READMEs and changelogs
Pipe your README.md, CHANGELOG.md, or generated docs straight to PDF for distribution, archive, or compliance binding.
How Markdown-to-PDF rendering works
1. Send Markdown source
POST your Markdown string. Optional: pass a custom theme name or override individual CSS variables (font, code theme, link color).
2. We parse and style
GitHub-flavored Markdown parser converts to HTML, Shiki tokenizes code blocks, our default theme applies typography rules.
3. PDF render via Chromium
The styled HTML is rendered to PDF using our standard render pipeline — fonts cached, page breaks respected.
What is the pdf.xhub Markdown-to-PDF API?
An opinionated Markdown-to-PDF renderer built for technical content: docs, reports, post-mortems, READMEs. Sensible defaults out of the box, full customization when needed — and a natural fit alongside URL-to-PDF for capturing rendered output.
Try it in your stack
Same endpoint. Copy as cURL, call from any language.
GitHub-flavored Markdown to PDF. Code highlighting, tables, and footnotes work out of the box — perfect for docs, reports, READMEs.
curl -X POST https://api.pdf.xhub.io/v1/render \
-H "Authorization: Bearer $PDFXHUB_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "markdown",
"markdown": "# Invoice\n\nThank you for your business."
}' --output invoice.pdfcurl -X POST https://api.pdf.xhub.io/v1/render \
-H "Authorization: Bearer $PDFXHUB_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "markdown",
"markdown": "# Invoice\n\nThank you for your business."
}' --output invoice.pdfFeatures at a glance
Markdown features
- GitHub-flavored Markdown (CommonMark + GFM)
- Shiki-powered syntax highlighting (180+ languages)
- Tables, footnotes, task lists, admonitions
- Math via KaTeX (optional)
- Mermaid diagrams (optional)
Authoring
- Custom themes (default, GitHub, minimal, custom CSS)
- Auto-generated table of contents
- Frontmatter for page metadata (title, author, date)
- Multi-file rendering (concatenate Markdown files)
- GDPR-compliant by default — DPA + SCCs included
Platform
- EU hosting (Frankfurt + Paris)
- Shiki tokenizer with 180+ languages bundled
- Auto-cached web fonts + Google Fonts mirror
- Edge-runtime: PDF returned in single round-trip
- OpenAPI 3.1 — generate clients for any language
- Per-render telemetry (page count, render time)
Other ways to render
Same API, different inputs.
Turn your README into a PDF
25 docs/month free forever. From README.md to print, with code highlighting.