Great Idea Foundry Markdown Toolkit

How to convert Markdown to PDF, with tables and diagrams

A practical guide with examples you can copy. The converter is right here: paste your Markdown, choose PDF and download - then read on for the details that make the result look right.

How to use the guide

  1. Paste your Markdown in the box above, or switch to Upload for a .md file.
  2. Check the PDF format and pick A4 or US Letter paper.
  3. Convert and download. Tables, code and diagrams come out as shown in the examples below.

What stays intact

  • Headings become real PDF headings, kept with the text that follows
  • Tables repeat their header row on every page
  • Code keeps its spacing in a fixed-width font
  • Mermaid diagrams become sharp pictures
  • Page numbers on every page

About the guide

1. Structure with headings

Start each section with # signs: one for the title, two for sections, three for sub-sections. The PDF uses them as headings, and a heading is never left alone at the bottom of a page.

# Quarterly report

## Summary
Sales grew 12% on last quarter.

## Details
### Europe
...

2. Tables

Write a header row, a separator row of dashes, then one row per line. Colons in the separator align a column. Long tables continue onto the next page with the header repeated.

| Region | Sales | Growth |
|--------|------:|-------:|
| Europe |  1.2m |    12% |
| Asia   |  0.9m |     8% |

3. Code blocks

Wrap code in three backticks and name the language after the opening fence. Spacing is kept exactly, which matters for YAML, Python and command-line examples.

```python
def total(items):
    return sum(i.price for i in items)
```

4. Diagrams with Mermaid

Put a Mermaid diagram in a block marked mermaid. It is drawn in your browser and placed in the PDF as a picture. If a diagram has a mistake it stays as code, so check it first in Mermaid Studio.

```mermaid
flowchart LR
  A[Draft] --> B{Review}
  B -->|approved| C[Publish]
  B -->|changes| A
```

5. Images

Images must be inside the document itself (embedded as data). Links to pictures on other websites are not downloaded, for safety, and appear as a short note instead. Converting a Word file to Markdown first gives you embedded images automatically.

![Sales chart](data:image/png;base64,iVBORw0KGgo...)

6. Fixing common problems

A table shows as plain text: the separator row is missing or has fewer columns than the header. A diagram stays as code: Mermaid could not read it, so open it in Mermaid Studio, which points to the line. Text runs together: leave an empty line between paragraphs.

Diagrams come out as real pictures

Write Mermaid in your Markdown. Every flowchart, sequence diagram and chart is drawn in your browser and placed in the PDF, Word or HTML file as a sharp image, so readers see the diagram, not the code.

Supported: flowcharts, sequence, class, state and ER diagrams, pie and Gantt charts, mind maps, timelines and every other Mermaid type.

Frequently asked questions

Which Markdown features are supported?
Headings, paragraphs, bold and italic, lists, quotes, links, tables, fenced code blocks, horizontal rules, embedded images and Mermaid diagrams (GitHub-flavoured Markdown).
Can I choose the paper size?
Yes: A4 or US Letter. The converter guesses from your browser region, and you can change it before converting.
Is my document stored?
No. It is converted in memory and sent straight back; nothing is kept.

Related