Tools API Blog
Sign in Create account

Markdown to PDF

Markdown to PDF is an API that converts Markdown text straight into a styled PDF (typography, tables, code blocks), no HTML or CSS required. Perfect for reports or documents generated from a Notion/Obsidian note or plain text.

How it works

You send the Markdown and internally it goes through two steps: first it's converted to HTML (same engine as Markdown to HTML), then that HTML is rendered into a PDF with a clean, readable default style already built in. No design work needed on your end.

Need your own design? Use Markdown to HTML and then HTML to PDF with your own CSS.

All you need

  • Your API key. Create it in your dashboard with "+ Create key". It's shown only once, so copy and save it.
  • In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream… all have one).

How to use it in n8n (step by step)

In the HTTP Request node:

  • Method: POST
  • URL: https://api.cofferdock.com/markdown-to-pdf
  • Send Headers: on → add two: x-api-key = your key, and Content-Type = application/json
  • Send Body: on → Body Content Type: JSON → { "markdown": "# Report\n\nThis month's numbers." }
  • In Options → Response → Response Format: choose File

In Make: same method and URL, same JSON in the Body, and treat the response as a binary file.

Options (inside the JSON)

OptionDefaultWhat it does
markdown-Required. The Markdown text to convert.
formatA4A3, A4, A5, Letter, Legal or Tabloid.
landscapefalseLandscape instead of portrait.
margin0Margin in millimeters, same on all 4 sides.

What you get back

By default: with Content-Type: text/plain it returns the raw PDF binary; with JSON it returns pdf as base64. Add output=pdf to force the binary either way, or output=url for a temporary download link (valid 15 minutes).