Forum Discussion
How can I convert markdown to pdf on Windows 11?
md2pdf-skill is an open-source tool built on a simple idea: use Python to turn Markdown into print-styled HTML, then call the Edge or Chrome browser already on your machine to print it to PDF in headless mode.
How It Performs on Windows 11
Very light dependencies: You only need Python 3.8+, the markdown library, and either Edge or Chrome. Windows 11 ships with Edge, so the browser requirement is already covered.
Chinese typesetting works out of the box: It has a built-in Chinese font stack (Microsoft YaHei, Source Han Sans, and others), automatically wraps long paragraphs, and repeats table headers across page breaks.
A4 output: Strictly laid out at 210 × 297 mm, so nothing shifts when printed.
Batch conversion: Supports recursively processing every .md file in a directory.
Installation and Usage
bash
git clone https://github.com/cy070812/md2pdf-skill.git
cd md2pdf-skill
pip install -r requirements.txt
Then you can convert markdown to pdf:
bash
python md2pdf.py report.md
md2pdf-skill's typesetting precision isn't as refined as a LaTeX-based solution — complex math formulas and academic-level bibliography formatting aren't its strengths. But if your main use case for wanting to convert markdown to pdf is Chinese technical documents, reports, or notes, it strikes a good balance between "low effort" and "good enough."