Convertir Markdown en PDF (2026) : trois methodes fiables
Trois methodes fiables pour convertir Markdown en PDF (Pandoc, impression navigateur, outils en ligne), ce que chacune preserve, plus l'option web-first : partagez un lien et exportez en PDF seulement si necessaire.
Markdown is great for writing; PDF is what people ask you to send. The gap between the two is a quick conversion - but which method you pick decides how well your headings, code, and tables survive. Here are the three reliable routes, what each preserves, and one option most guides skip.
1. Pandoc: the most control
Pandoc is the standard for Markdown conversion. With a PDF engine installed, the command is simply:
pandoc input.md -o output.pdf
It maps Markdown headings, lists, tables, and fenced code blocks into a formatted PDF. You control the look with a template and options like --pdf-engine=wkhtmltopdf (HTML-based, good for web-styled docs) or a LaTeX engine (best typography). The cost is setup: you need Pandoc plus an engine (TinyTeX is a light LaTeX option). For repeatable, styled output at scale, Pandoc wins.
2. Print to PDF: the fastest, no install
Open the Markdown in anything that shows a rendered preview - VS Code with a Markdown extension, Typora, Obsidian, or a browser editor - then use Print and choose Save as PDF. The PDF captures exactly what the preview renders, including fonts and code styling. It takes seconds and needs no command line. The tradeoff is less control over page breaks, margins, and headers than Pandoc, and wide tables can clip at the page edge.
3. Online converters: convenient, mind the privacy
Plenty of web tools take a pasted Markdown or an uploaded .md and hand back a PDF. They are convenient when you are on a machine you cannot install software on. Two cautions: your content is uploaded to someone else's server (avoid for anything sensitive), and formatting fidelity varies a lot between tools. Fine for a quick, non-confidential doc; not ideal for a contract or internal report.
| Pandoc | Print to PDF | Online tool | Plain (web-first) | |
|---|---|---|---|---|
| Best for | Styled, repeatable output | A quick one-off | No-install convenience | A doc that stays current |
| Install needed | Yes (+ engine) | No | No | No |
| Keeps code / tables | Yes | Yes (from preview) | Varies | Yes |
| Privacy | Local | Local | Uploaded | Your account |
| Output | PDF file | PDF file | PDF file | Link + PDF export |
The option most guides skip: a link instead of a file
Every method above ends in a PDF - a fixed snapshot. That is exactly right when you need an archival, print-ready file: a signed document, a conference upload, a formal report. But a lot of the time a PDF is just the habit. Someone asked for "a file," so you flatten a living document into pages, email it, and then re-send a new version the next time a number changes.
The web-first alternative is to keep the document as a page you share as a link. With Plain, you write in Markdown (or let AI draft it) and it renders a formatted web document you hand around as a URL. It stays current for everyone on the link, opens on any device with no install, and can hold live charts and working links a PDF cannot. When a receiver genuinely needs a file, Plain exports Word or PDF as a fallback - the same destination the tools above start from, kept as the exception rather than the default.
How to choose
You want... -> Reach for ----------------------------------------------------------- Styled, repeatable, scriptable PDF -> Pandoc A quick one-off, no install -> Print to PDF Convenience on a locked-down machine -> Online converter A doc that stays current + PDF later -> Plain (web-first)
Pick by the last mile. If the PDF is the final, unchanging artifact, Pandoc or Print to PDF is all you need. If the document will keep changing and be shared with others, a link that stays current beats re-sending files - and you can still export a PDF the moment someone insists on one.