Back to Blog

Markdown to PDF With Mermaid Diagrams, Drawn and Sharp

November 11, 2026by TypeFire
markdown to pdf mermaidmermaid to pdfmarkdown pdf with diagramsmd to pdfmarkdown to pdfexport mermaid diagram pdfconvert md file to pdf

You've written a design doc in Markdown with three Mermaid diagrams in it. It reads well in your editor. Then you convert it to PDF to send it, and the diagrams come out as blocks of code.

That's because most converters see a code block and print it. To get the diagrams, you need a tool that draws Mermaid before it writes the PDF.

The short version

  • In your browser, free: open the file in TypeFire’s Markdown to PDF editor, then File, Download, PDF.
  • Diagrams are drawn into the PDF, tables keep their rows together, pages are numbered.
  • On a Mac, TypeFire exports any note as PDF, Word or HTML with its diagrams.
  • Getting code instead of a picture? The converter isn’t drawing Mermaid.

The free way, in your browser

  1. Open the free Markdown to PDF editor, then drop your .md file on the page, or paste the text.
  2. Check the diagrams drew. Click one to fix a line if something's off.
  3. Choose File, then Download, then PDF. The file saves in one click, with no print dialog.
A Markdown plan with a Mermaid Gantt chart downloaded as a PDF with the chart drawn in it
The Mermaid block becomes a drawn chart in the PDF.

What comes through

In your Markdown In the PDF
Mermaid diagrams Drawn
Headings, bold, italic, links Kept
Lists and task lists Kept
Tables Kept, a row is never split, the header repeats on each page
Code blocks and quotes Kept
Pages Numbered, Letter in the US and Canada, A4 elsewhere

The PDF is made in your browser. Nothing is uploaded.

On a Mac, from your notes

If the document is a note in TypeFire, export it straight from the note: PDF, Word or HTML, with every diagram and any math included. You can also copy a single diagram as an image, or open it full window and save it as SVG or PNG.

An expense approval flowchart, the kind of diagram that should arrive in a PDF as a picture, not as code

Other ways, and what to watch for

  • Command-line tools. Converters like Pandoc print a mermaid block as code unless you add a Mermaid filter, which needs extra software installed.
  • Print to PDF from a preview. Works if the preview draws Mermaid, but wide diagrams can be cut at the page edge and the print dialog adds steps.
  • Screenshots pasted into a doc. Works once, then the diagram and the file drift apart.

Tips for a clean PDF

  • Keep wide diagrams top to bottom. A TD flowchart fits a page better than a long LR one. More fixes in making Mermaid diagrams readable.
  • Put a heading above each diagram so it doesn't end up alone at the bottom of a page.

Ready? Open the Markdown to PDF editor. For diagrams inside your own notes, see diagrams in TypeFire.

In their words

Loved by people who type all day.

Unprompted reactions from users, in their own words.

Exactly what macOS has been needing: blazing fast, beautifully designed, and it respects your privacy without forcing a subscription.
Physician
I use TypeFire every single day, all day long. I love it.
Works at Apple
The way you've handled the AI integrations is very elegant. A great implementation.
Mac user
TypeFire is the absolute replacement for TextExpander.
Works at Apple
I love your app. Love it. The only one that does what I want it to do.
Mac user
I'm loving the date math. Amazing, love it.
ICU doctor
It instantly imported my 502 snippets. Flawless import.
Moved over from TextExpander
Incredibly lightweight. It has quickly become a go-to tool in my daily workflow.
Physician
Love the app, and your development pace rocks.
Longtime user
This app is AWESOME! And I definitely want to buy the Pro version.
Free user
Fantastic. Thank you for the very fast fix.
EU keyboard user
This app has so much potential. I'm really grateful that I found it.
Mac user

Used by people at

AppleRed HatPalo Alto NetworksHubSpotIndeedSentryFreshworksTrustpilotBumbleFarfetchSaint-GobainfoodpandaMcKinseyAccentureIntuitInstacartRakutenDow JonesHearstRokuxAINuroGitGuardianMeltwaterDevRevWoltAirwallex

Company names are places where our users work. They do not imply endorsement or affiliation.