Loading...
Loading...
Convert Markdown documents into professional PDF whitepapers with Apple design style. Supports full Markdown syntax (code blocks, tables, blockquotes, lists, etc.). Automatically generates cover pages, table of contents, headers and footers. Use cases: Technical documents, whitepapers, tutorials, reports and other Markdown documents that require professional typesetting.
npx skill4agent add alchaincyf/huashu-skills markdown-to-pdf# 转换单个文件
python scripts/convert.py input.md
# 指定输出文件名
python scripts/convert.py input.md -o "我的白皮书.pdf"
# 自定义标题和作者
python scripts/convert.py input.md --title "技术白皮书" --author "花叔"# 文档标题
## 1. 第一章
### 1.1 第一节
### 1.2 第二节
## 2. 第二章
### 2.1 第一节## 1. Title### 1.1 Titlescripts/convert.py# 主色调
PRIMARY_COLOR = '#06c' # 苹果蓝
TEXT_COLOR = '#1d1d1f' # 主文本黑色
GRAY_COLOR = '#86868b' # 浅灰色
# 字体大小
COVER_TITLE_SIZE = '64pt'
H2_SIZE = '22pt'
H3_SIZE = '17pt'
BODY_SIZE = '11pt'## 1. Title## Title### 1.1 Title### Title```python
def hello():
print("Hello")
```| Column1 | Column2 |
|-----|-----|
| Value1 | Value2 |scripts/convert.pyfont-familypip3 install markdown2 weasyprintbrew install pango
pip3 install weasyprintpython scripts/convert.py tech-guide.md -o "技术指南.pdf"python scripts/convert.py whitepaper.md --title "产品白皮书" --author "团队"scripts/convert.pyscripts/styles.csstemplates/cover.html