// md-to-pdf
Convert markdown to a styled PDF.
Paste your markdown below. SuperMD renders it with clean typography — headings, code blocks, tables, and lists — then opens a print dialog so you can save it as PDF.
Getting Started
Welcome to md-to-pdf — paste your markdown here and download a clean PDF.
Features
- Renders headings, lists, and emphasis correctly
- Code blocks with monospace font
- Tables and blockquotes
- Clean, print-ready layout
Code Example
function greet(name: string): string {
return `Hello, ${name}!`
}
Table Example
| Column A | Column B | Column C | |----------|----------|----------| | Value 1 | Value 2 | Value 3 | | Value 4 | Value 5 | Value 6 |
Replace this content with your own markdown and click Download PDF.
99 words · 586 chars
How it works
Clicking “Download PDF” opens your rendered document in a new tab and triggers the browser's print dialog. Choose “Save as PDF” as the destination. The rendered document uses web fonts and precise CSS — the resulting PDF matches what you see in the preview.
// supported markdown
What renders in the PDF.
Text
- Headings h1–h6
- Bold & italic
- Blockquotes
- Horizontal rules
Code
- Fenced code blocks
- Inline code
- Language hints
- Monospace font
Structure
- Ordered lists
- Unordered lists
- Nested lists
- Tables
Media
- Links
- Images
- HTML tags
- GFM checkboxes
// faq
Frequently asked questions
Does my markdown get uploaded to a server?
No. Conversion runs entirely in your browser. Your markdown is rendered locally with React, then printed via the browser's native print engine. Nothing is sent to a server.
Why does it use the print dialog instead of a direct download?
The browser's PDF engine produces much higher-quality output than JavaScript PDF libraries. Fonts, hyphenation, page breaks, and table rendering are all handled natively — resulting in a PDF that looks exactly like the preview.
Can I control page margins or font size?
The layout uses sensible defaults (48px padding, 14px body text, 740px max-width). For custom styles, you can use the browser's print settings (Ctrl/Cmd+P) to adjust margins, paper size, and scale before saving.
Does it support GitHub Flavored Markdown (GFM)?
Yes — the renderer supports tables, strikethrough, task list checkboxes, and inline HTML via rehype-raw. Most GFM documents render correctly out of the box.