20181112523/md-to-pdf-advanced/SKILL.md
Convert Markdown files to PDF with multiple backend options (WeasyPrint, Pandoc, wkhtmltopdf). Supports syntax highlighting, tables, images, custom CSS themes, and page styling. Use when converting Markdown (.md) to PDF, generating documents from markdown, creating PDF reports, or any markdown-to-pdf conversion task. Triggers on markdown to pdf, md to pdf, convert markdown pdf, generate pdf from markdown.
npx skillsauth add openclaw/skills md-to-pdf-advancedInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert Markdown files to PDF with professional formatting. Supports multiple backends for different use cases.
# Using WeasyPrint (recommended, auto-installed)
python3 scripts/md_to_pdf.py input.md output.pdf
# Using Pandoc (if installed)
python3 scripts/md_to_pdf.py input.md output.pdf --backend pandoc
# Convert markdown to PDF
exec("python3 skills/md-to-pdf-advanced/scripts/md_to_pdf.py /path/to/input.md /path/to/output.pdf")
# Apply custom theme
exec("python3 skills/md-to-pdf-advanced/scripts/md_to_pdf.py input.md output.pdf --css skills/md-to-pdf-advanced/assets/github-theme.css")
# Landscape, custom margins
exec("python3 skills/md-to-pdf-advanced/scripts/md_to_pdf.py input.md output.pdf --orientation landscape --margin 15mm")
Available in assets/:
github-theme.css - GitHub-like stylingminimal-theme.css - Clean minimal lookacademic-theme.css - Academic paper style# Install system dependencies first (Ubuntu/Debian)
sudo apt-get install python3-dev libffi-dev libxml2-dev libxslt1-dev
# Then install Python packages
pip3 install weasyprint markdown Pygments
Use absolute paths or ensure images are relative to the markdown file location.
WeasyPrint uses system fonts. Install the fonts you reference in CSS:
# Ubuntu/Debian
sudo apt-get install fonts-liberation fonts-dejavu
# macOS
brew install --cask font-liberation
PDF 中 emoji(如 ✅、🔄、📋)显示为方框是因为系统缺少彩色 Emoji 字体支持。
解决方案:
# 1. 安装 Google Noto Color Emoji 字体(支持全量 Unicode Emoji)
# Fedora/RHEL/CentOS
dnf install -y google-noto-emoji-color-fonts
# Ubuntu/Debian
sudo apt-get install fonts-noto-color-emoji
# 2. 刷新字体缓存让系统识别新字体
fc-cache -fv
# 3. 重新转换 PDF
python3 skills/md-to-pdf-advanced/scripts/md_to_pdf.py input.md output.pdf
替代方案(如果不想安装字体):
将 Markdown 中的 emoji 替换为文字描述或 ASCII 符号:
| Emoji | 文字替代 | ASCII 替代 |
|-------|----------|------------|
| ✅ | [OK] 或 (完成) | [x] |
| ❌ | [FAIL] 或 (失败) | [ ] |
| 🔄 | [更新] 或 (刷新) | ~> |
| 📋 | [列表] 或 (任务) | [#] |
| ⚠️ | [警告] 或 (注意) | ! |
| 💡 | [提示] 或 (建议) | i |
| 🔧 | [修复] 或 (工具) | | |
| 🐛 | [BUG] 或 (缺陷) | * |
tools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。