MDUtil

Markdown to PDF Converter

Paste Markdown or an AI answer, set the paper size and margins, and save a PDF with selectable text, formulas and highlighted code. Nothing is uploaded.

Your browser's print dialog opens. Choose Save as PDF as the destination.

Markdown

921 characters47 lines

Preview

Project brief: Field notes app

Team: Research tools · Updated: 12 March

Goal

Give field researchers one place to record observations offline and sync them once they are back online.

Scope
  1. Capture text, photos and the GPS position of each observation
  2. Work without a connection for up to a week
  3. Export a day's notes as a PDF report
Timeline
PhaseWeeksStatus
Research2Done
Prototype4In progress
Pilot6Planned
Storage

A researcher who records nn observations a day with pp photos each needs about

S=n×(0.4+2.5 p) MBS = n \times (0.4 + 2.5\,p) \ \text{MB}
{
  "syncInterval": "15m",
  "keepOffline": "7d",
  "photoQuality": 0.8
}

Field tests start in the second week of April.

Appendix: sync rules
  • The newest edit wins when two devices change the same note
  • Photos upload only on Wi-Fi

How to convert Markdown to PDF

  1. Paste or open Markdown

    Paste text, open a .md file, or copy an answer from ChatGPT, Claude or Gemini with its copy button.

  2. Set up the page

    Pick the paper size, orientation, margins and text size. The preview shows the page at its real width.

  3. Save as PDF

    Click Save as PDF and choose Save as PDF as the destination in the print dialog. Untick Headers and footers if the date and page address appear.

Markdown to PDF, before and after

Chrome printed the sample to PDF with the converter's default settings. The \newpage line starts the appendix on page 2; this is page 1.

Markdown
# Project brief: Field notes app

**Team:** Research tools · **Updated:** 12 March

## Goal

Give field researchers one place to record observations offline and sync them once they are back online.

## Scope

1. Capture text, photos and the GPS position of each observation
2. Work without a connection for up to a week
3. Export a day's notes as a PDF report

## Timeline

| Phase | Weeks | Status |
| :---- | ----: | :----- |
| Research | 2 | Done |
| Prototype | 4 | In progress |
| Pilot | 6 | Planned |

## Storage

A researcher who records $n$ observations a day with $p$ photos each needs about

$$
S = n \times (0.4 + 2.5\,p) \ \text{MB}
$$

```json
{
  "syncInterval": "15m",
  "keepOffline": "7d",
  "photoQuality": 0.8
}
```

> Field tests start in the second week of April.

\newpage

## Appendix: sync rules

- [x] The newest edit wins when two devices change the same note
- [ ] Photos upload only on Wi-Fi
Page 1 of the PDF
Page 1 of the project brief as a PDF: headings with a rule under them, a numbered list, a table, a formula, a shaded code block, a quote and the page number 1 / 2 at the bottom.

What it handles

Text you can select
The PDF holds real text: you can search it, copy from it and have it read aloud, and links stay clickable.
Formulas and code
LaTeX such as $E = mc^2$ is typeset, and code blocks keep their syntax colors and wrap long lines inside the page.
Page breaks and numbers
Put \newpage on a line of its own to start a new page. Chrome and Edge print page numbers at the bottom.
Paper and margins
A4, US Letter, Legal, A3 or A5, portrait or landscape, with narrow, normal or wide margins.
Tables that hold together
Tables keep their column alignment, rows stay whole across page breaks, and headings stay with the text after them.
Diagrams, images and CJK text
Mermaid diagrams print as sharp vector graphics, and Chinese and Japanese text uses your system fonts, embedded in the PDF.

Markdown syntax and how it looks in the PDF

The PDF is laid out the way the preview shows it. Everything below prints with its formatting, and the text stays selectable.

ElementMarkdownIn the PDF
Headings
## Results
Headings in larger type that stay on the same page as the text after them
Bold, italic, strikethrough
**bold**, *italic*, ~~old~~
Bold, italic and struck-through text
Links
[MDUtil](https://mdutil.com)
Links you can still click in the PDF
Lists
- Apples
  - Green apples
1. First step
Bulleted and numbered lists with their nesting
Task lists
- [x] Done
- [ ] To do
Check boxes, ticked or empty
Tables
| Name | Score |
| :--- | ----: |
| Ada | 92 |
Tables with their column alignment; a row is never split across two pages
Code blocks
```python
print("Hello")
```
Syntax colors, with long lines wrapped inside the page
Formulas
$E = mc^2$
Typeset formulas that stay sharp when you zoom in
ChatGPT formulas
\( a^2 + b^2 = c^2 \)
Typeset like $ formulas while Clean up AI output is on
Footnotes
Text[^1]

[^1]: Source.
Numbered notes at the end of the document
Quotes
> Quoted text
Gray text with a line on the left
Images
![Chart](https://example.com/chart.png)
Images, scaled down to fit the page width
Mermaid diagrams
```mermaid
graph LR
  A --> B
```
Sharp vector diagrams
Page breaks
\newpage
What follows starts on a new page

Other ways to convert Markdown to PDF

Pandoc

Pandoc converts from the command line and gives the most control over typesetting. It makes PDFs through LaTeX by default, so install a TeX distribution such as TeX Live or MiKTeX first.

pandoc report.md -o report.pdf --pdf-engine=xelatex -V geometry:margin=2cm

XeLaTeX handles Unicode; add -V CJKmainfont="Noto Serif CJK SC" for Chinese or Japanese text. To skip LaTeX, let an HTML engine make the PDF and style it with CSS: --pdf-engine=weasyprint --css print.css.

VS Code

Install the Markdown PDF extension, open the file and run Markdown PDF: Export (pdf) from the command palette. The extension downloads Chromium the first time it runs.

Typora and Obsidian

Typora exports with File → Export → PDF. In Obsidian, open the note and run Export to PDF from the command palette.

Many files at once

md-to-pdf converts files from the terminal with headless Chrome and writes each PDF next to its Markdown file:

npx md-to-pdf report.md
npx md-to-pdf docs/*.md

Questions and answers

How do I convert Markdown to PDF?

Paste the Markdown above, choose the paper size, click Save as PDF and pick Save as PDF in the print dialog. Your browser creates the PDF on your device.

Why does a print dialog open?

The PDF is made by your browser's print engine, which lays out text, fonts, formulas and diagrams the way the preview shows them and keeps the text selectable. Choose Save as PDF (Firefox calls it Save to PDF) as the destination.

How do I remove the date and web address from the pages?

Browsers add them when headers and footers are switched on. In Chrome and Edge, open More settings in the print dialog and untick Headers and footers; in Safari and Firefox, untick Print headers and footers.

How do I add a page break?

Put \newpage or \pagebreak on a line of its own, with an empty line before and after it. What follows starts on a new page, and the preview marks the break with a dashed line.

Why are there no page numbers?

Page numbers come from a print rule that Chrome and Edge support. In Safari and Firefox, tick Print headers and footers in the print dialog to get the browser's own page numbers.

Can I save the PDF on a phone?

Yes. On iPhone and iPad, tap Save as PDF, then tap the share button on the print options screen and choose Save to Files. On Android, choose Save as PDF as the printer.

Is my document uploaded anywhere?

No. The preview and the PDF are both made in your browser, so the Markdown never leaves your device.

Should I use Pandoc instead?

Pandoc suits conversions you run often from scripts, and documents that need citations or LaTeX typesetting; the commands are above. This page needs no installation and shows the result before you save it.