Install
openclaw skills install sjht-ppt-deliveryConvert HTML slide deck to PDF and send to Feishu user. Use when the user asks to generate a PPT/presentation and deliver it as a PDF file via Feishu message. Triggers on: "做PPT", "做个演示", "生成PPT", "做幻灯片", "发送PDF", "转PDF", "做报告", or when a PPT/slide task is completed and needs delivery. This skill covers the full pipeline: HTML slides → font scaling → PDF conversion → Feishu file upload & send.
openclaw skills install sjht-ppt-delivery完整流程:生成 HTML 幻灯片 → 放大字体 → 转 PDF → 上传飞书发送给用户。
chromium-browser(已安装)puppeteer-core(全局 npm 包)pdf-lib(全局 npm 包)requests(已安装)使用 frontend-slides 或 jobs-style-ppt-generator skill 生成 HTML 文件。
用户通常反馈字体太小,默认执行两轮放大:
第一轮放大(CSS 修改):
22px第二轮放大(如用户仍嫌小):
26px始终保持标题/正文层级关系。
使用脚本逐 slide 截图嵌入 PDF,保证视觉一致性:
NODE_PATH=$(npm root -g) node <skill_dir>/scripts/html2pdf.cjs <input.html> <output.pdf>
参数:
--width 1920(默认)--height 1080(默认)输出:多页 PDF(每页一张幻灯片截图)。
将 PDF 通过飞书 Bot API 发送给用户:
python3 <skill_dir>/scripts/send_file_feishu.py <pdf_path> <user_open_id>
user_open_id 从消息的 inbound metadata sender_id 获取。
1. UI agent 生成 /root/projects/report.html
2. 字体放大(两轮)
3. NODE_PATH=$(npm root -g) node ppt-delivery/scripts/html2pdf.cjs /root/projects/report.html /root/projects/report.pdf
4. python3 ppt-delivery/scripts/send_file_feishu.py /root/projects/report.pdf ou_xxxxx
5. 回复用户:"PDF 已发送 📎"
im:message:send_as_bot 权限