2pdf
Easy Markdown → PDF conversion, with nice looking defaults, custom style support and zero external dependencies (everything is bundled):
uvx 2pdf README.mdResult is written to README.pdf
---
Additional options
For more options, run:
uvx 2pdf --help- -s, --style STYLE — Style name, local path, or URL. Default: water.
- There are many bundled stylesheets: water, sakura, github, latex, tufte, etc.
- --list-styles — List included and cached styles.
-
- -o, --output PATH — Output PDF path (defaults to input with .pdf).
- --stdout — Write PDF to stdout instead of a file.
- --no-cache — For URL styles, download to a temp file instead of caching.
- --title, --toc, --pandoc-arg … — Pass through to Pandoc. See --help.
Use 2pdf-clear-cache to clear the style download cache.
Styles
The package includes a large set of popular CSS styles (e.g., water.css, sakura.css, GitHub Markdown CSS, latex.css, Tufte.css, etc.).
You can also point to any CSS URL:
2pdf notes.md -s https://cdn.jsdelivr.net/npm/water.css@2/out/water.cssOr use a local file: