oldliandClaude Sonnet 5 355b01b9dc PM: html2pptx v4 - add .imported-theme-root slide detection
DashiAI real HTML uses .imported-theme-root > .slide.imported-theme-slide,
not .ppt-deck > .ppt-slide. Added as first priority selector,
. ppt-deck kept as fallback for backward compatibility.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 11:27:38 +08:00

html2pptx

HTML to editable PPTX export engine.

将 HTML 演示文稿导出为文字可编辑、布局可还原的 PPTX 文件。

原理

HTML 文件 → HTTP 服务 → Chrome headless 渲染 → DOM 遍历提取位置/样式 → pptxgenjs 生成 PPTX

依赖

  • Node.js 18+
  • Chrome / Chromium / Edge(用于渲染页面)

使用

# 安装
npm install

# 导出
node bin/html2pptx input.html output.pptx

核心依赖

用途
playwright 控制 Chrome headless 渲染页面
pptxgenjs 生成 PPTX 文件
http-server 本地静态文件服务(可选)

License

MIT

S
Description
HTML to editable PPTX export engine
Readme
741 KiB
Languages
JavaScript 93.6%
CSS 3.4%
HTML 3%