用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dvcrn/openclaw-skills-marketplace --skill pdf-generation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | pdf-generation |
| description | PDF Generation |
Purpose: Generate professional PDFs from HTML/CSS without whitespace gaps or layout issues.
When generating PDFs from HTML, page-break-inside: avoid causes orphan whitespace — content that can't fit on the current page gets pushed entirely to the next page, leaving huge gaps.
❌ WRONG:
<div class="page" style="min-height: 297mm;">
<!-- Content -->
</div>
✅ RIGHT:
<body>
<!-- Content flows naturally -->
</body>
Use @page CSS rules instead of fixed page containers:
@page {
size: A4;
margin: 18mm 15mm;
}
Only use break-inside: avoid on elements that:
✅ Protect:
tr)❌ Do NOT Protect:
.small-element {
break-inside: avoid; /* Modern spec */
page-break-inside: avoid; /* Legacy support */
}
h2, h3, h4, .section-header {
break-after: avoid;
page-break-after: avoid;
}
body {
orphans: 3; /* Min lines at bottom of page */
widows: 3; /* Min lines at top of page */
}
table {
/* NO break-inside: avoid */
}
tr {
break-inside: avoid;
page-break-inside: avoid;
}
@page {
size: A4;
margin: 18mm 15mm;
}
body {
font-size: 10pt;
line-height: 1.5;
orphans: 3;
widows: 3;
}
/* Headers stay with content */
h2, h3, h4 {
break-after: avoid;
page-break-after: avoid;
}
/* Small elements don't break */
.card, .highlight-box, .step, .timeline-item {
break-inside: avoid;
page-break-inside: avoid;
}
/* Table rows stay together, table can break */
tr {
break-inside: avoid;
page-break-inside: avoid;
}
/* Large containers flow naturally */
table, .section, .two-col {
/* NO break-inside: avoid */
}
@media print {
body {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
| Tool | Use Case | Install |
|---|---|---|
| WeasyPrint | HTML/CSS → PDF (best CSS support) | brew install weasyprint or pip install weasyprint |
| Pandoc | Markdown → PDF via LaTeX | brew install pandoc |
| wkhtmltopdf | Complex layouts | Download from wkhtmltopdf.org |
| Puppeteer | JS-rendered content | npm install puppeteer |
weasyprint input.html output.pdf
Before sending ANY PDF:
| Mistake | Fix |
|---|---|
page-break-inside: avoid on large containers | Remove it, let content flow |
| Fixed-height page divs | Use @page rules instead |
| Quote box at document end with break protection | Remove break protection |
| Entire table protected from breaking | Only protect tr, not table |
No orphans/widows set | Add orphans: 3; widows: 3; |
Skill created by Bartok — March 6, 2026
监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your agent a soul.
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
基于 SOC 职业分类