Skills markdown-to-pdf
Convert Markdown files to beautiful PDF documents. Supports custom styling, code highlighting, and multiple output options. Use when users need to convert MD to PDF for documentation, notes, reports, or sharing.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/alone86136/markdown-to-pdf" ~/.claude/skills/openclaw-skills-markdown-to-pdf && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/alone86136/markdown-to-pdf" ~/.openclaw/skills/openclaw-skills-markdown-to-pdf && rm -rf "$T"
manifest:
skills/alone86136/markdown-to-pdf/SKILL.mdsource content
markdown-to-pdf
Overview
Convert Markdown text or files to professional-looking PDF documents. Uses
markdown package to convert MD to HTML, then wkhtmltopdf to generate PDF. Supports code syntax highlighting and custom CSS styling.
Features
- Convert MD file to PDF: Take a Markdown file and output a ready-to-share PDF
- Standalone output: Embeds all styles, no external dependencies
- Code highlighting: Automatic syntax highlighting for code blocks
- Custom CSS: Option to provide custom CSS for styling
Dependencies
pip install markdown pygments # You also need wkhtmltopdf installed: # macOS: brew install wkhtmltopdf # Ubuntu/Debian: sudo apt install wkhtmltopdf
Usage
Basic conversion
python3 scripts/convert.py input.md output.pdf
With custom CSS
python3 scripts/convert.py --css custom.css input.md output.pdf
Resources
scripts/
- Convert Markdown file to PDFconvert.py