← All posts

2026-04-28

How to convert Markdown to PDF with custom branding

Generate professional PDFs from Markdown files with your logo, colours, and fonts on every page — using Chrome headless rendering and a DOCX template.

PDF is the universal delivery format. Whether you're sending a proposal, a technical spec, or a compliance report, PDF ensures it looks identical on every device and can't be accidentally edited.

Converting Markdown to PDF while keeping your brand consistent is harder than it looks. Here's why — and how Wagoe Blueprint solves it.

The challenge with Markdown → PDF

There are three common approaches, each with real drawbacks:

1. Markdown → HTML → PDF (wkhtmltopdf, Prince) Works, but requires CSS expertise to get headers, footers, and page breaks right. Font rendering is inconsistent across platforms.

2. Markdown → DOCX → PDF (Word export) Requires Microsoft Word (paid, Windows/macOS only). Not automatable from a Linux server.

3. Markdown → LaTeX → PDF (pdflatex, xelatex) Technically excellent output, but LaTeX has a steep learning curve and fragile template system.

Wagoe Blueprint's approach: Chrome CDP

Wagoe converts Markdown to a styled HTML document and renders it to PDF using Chrome's headless DevTools Protocol (CDP). This gives you:

How to generate a branded PDF

Via the web UI

  1. Upload a Markdown file in the converter
  2. Choose PDF as the output format
  3. Optionally select a DOCX template (the styles inform the PDF's typography)
  4. Click Convert — download your PDF in seconds

Via the REST API

curl -X POST https://your-org.wagoe.com/api/v1/convert \
  -H "X-API-Key: wbk_live_..." \
  -F "md-file=@proposal.md" \
  -F "output-format=pdf" \
  -o proposal.pdf

GitHub Actions integration

- name: Generate PDF report
  run: |
    curl -X POST https://your-org.wagoe.com/api/v1/convert \
      -H "X-API-Key: ${{ secrets.WAGOE_API_KEY }}" \
      -F "md-file=@docs/report.md" \
      -F "output-format=pdf" \
      -o artifacts/report.pdf

Custom headers per organisation

On Professional and Business plans, every PDF includes a branded header — your organisation's logo, name, and optionally a tagline. This is configured once in your account settings and applied to every PDF conversion automatically.

Tips for clean PDF output

Summary

Wagoe Blueprint converts Markdown to publication-quality PDF in under 10 seconds, with your branding on every page and no manual reformatting. Add it to your CI/CD pipeline and forget about it.

Ready to automate your document workflow?

Try Wagoe Blueprint free →