📄
Markdown 一键转专业 PDF
md-2-pdf · v1.0.0
入口已确认,内容待校验
文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
2.6k 下载
0 安装
10.8k 收藏
32 浏览
简介
基于 ReportLab 将 Markdown 文档转换为专业格式 PDF,支持完整语法渲染与自动分页,适合技术文档导出场景。
原始描述
Convert markdown files to clean, formatted PDFs using reportlab
通过你的 Agent 添加
安装目录:md-2-pdf/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
Claude Code~/.claude/skills/md-2-pdf/
Codex CLI~/.codex/skills/md-2-pdf/
DeepSeek Harness~/.agents/skills/md-2-pdf/
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: md-to-pdf description: Convert markdown files to clean, formatted PDFs using reportlab metadata: {"openclaw":{"emoji":"📄","requires":{"bins":["uv"]}}}
Markdown to PDF
Convert markdown documents to professional, clean PDFs with proper formatting.
Usage
# Basic usage
uv run scripts/md-to-pdf.py input.md
# Specify output
uv run scripts/md-to-pdf.py input.md -o output.pdf
uv run scripts/md-to-pdf.py input.md --output my-report.pdf
# Verbose mode
uv run scripts/md-to-pdf.py input.md -v
Features
- Headers: H1-H6 with hierarchical styling
- Text formatting: Bold, italic, inline code
- Lists: Bullet lists, numbered lists, task lists
- Code blocks: Syntax highlighting with background
- Tables: Full table support with headers
- Links: Clickable hyperlinks
- Horizontal rules: Visual section dividers
- YAML frontmatter: Automatically skipped
- Special characters: Emojis, Unicode symbols
- Page numbers: Automatic footer with page numbers
- Professional styling: Clean, readable output
Options
-o, --output: Output PDF file path (default: input_filename.pdf)-v, --verbose: Print detailed processing information
Supported Markdown Elements
| Element | Syntax | Status |
|---|---|---|
| Headers | # H1 to ###### H6 |
✅ |
| Bold | **text** or __text__ |
✅ |
| Italic | *text* or _text_ |
✅ |
| Inline code | `code` |
✅ |
| Code blocks | ``` | ✅ |
| Bullet lists | - item or * item |
✅ |
| Numbered lists | 1. item |
✅ |
| Task lists | - [x] done |
✅ |
| Tables | ` | col |
| Links | [text](url) |
✅ |
| Horizontal rules | --- or *** |
✅ |
| Blockquotes | > quote |
✅ |
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。