markdown-to-pdf

Installation
SKILL.md

Markdown to PDF

Convert one or more Markdown files into styled PDFs using WeasyPrint and the Python markdown library. The default styling is intentionally neutral — apply your own brand stylesheet via --css.

How to use

Run the conversion script via uv run:

uv run --with markdown --with weasyprint python3 "${SKILL_DIR}/scripts/convert.py" <files...> [-o output_dir] [--css custom.css]

${SKILL_DIR} is the directory containing this SKILL.md. The script resolves assets/style.css relative to its own location, so it works regardless of install path.

Steps

  1. Identify target .md files from the user's request. If none specified, look for .md files in the current directory and ask which to convert.
  2. Run the conversion:
Installs
2
First Seen
14 days ago