Getting Started
Install md2pdf
Homebrew (macOS / Linux)
brew install 135yshr/tap/md2pdf
Go install
go install github.com/135yshr/md2pdf/cmd/md2pdf@latest
Build from source
git clone https://github.com/135yshr/md2pdf.git
cd md2pdf
go build -o md2pdf ./cmd/md2pdf
Install runtime dependencies
md2pdf uses external tools for diagram rendering and PDF generation.
# Mermaid CLI (diagram rendering)
npm install -g @mermaid-js/mermaid-cli
# Playwright + Chromium (PDF generation)
pip install playwright
playwright install chromium
Install fonts (optional)
For Japanese text support, install the Noto Sans CJK JP font:
macOS
brew install font-noto-sans-cjk
Ubuntu / Debian
sudo apt install fonts-noto-cjk
Convert your first document
md2pdf document.md
A document.pdf file will be generated in the same directory.
Last updated: 2026-04-15