Export PowerPoint pages to PDF with Windows GUIs and a cross-platform CLI / 导出 PowerPoint 页面为 PDF,支持 Windows GUI 和跨平台 CLI。
Project description
PPT2Fig
PPT2Fig 用来把 ppt、pptx、odp 中指定页面导出成 PDF,并可选自动裁掉多余白边,适合论文、汇报和文档插图场景。
English README: README.en.md
项目用途
- 支持单页、多页、页码范围导出。
- 同时覆盖桌面交互导出和脚本/自动化导出。
- 保持后端标识稳定:
auto、libreoffice、wps、powerpoint。 - 同时提供 CLI 和 GUI 入口。
后端支持
当前 auto 模式的优先级:
LibreOffice > WPS > PowerPoint
支持情况:
LibreOffice:Windows / Linux / macOSWPS:WindowsPowerPoint:文件模式导出支持 Windows,快速活动演示文稿导出支持 Windows/macOS
使用方式
快速 GUI
适合当前已经打开 PowerPoint,希望“改一页,导一页”。
ppt2fig
文件模式 GUI
适合手动指定文件路径、页码、后端和输出路径。
ppt2fig-file-gui
CLI
适合脚本、批处理、自动化和 AI 调用。
ppt2fig ./demo.pptx --pages 3
安装
Windows 可执行文件
Releases:
https://github.com/elliottzheng/ppt2fig/releases
ppt2fig.exe:快速 GUIppt2fig-file-gui.exe:文件模式 GUIppt2fig-cli.exe:CLI
pip
pip install ppt2fig
安装后可直接运行:
ppt2fig
OpenClaw / ClawHub 技能
clawhub install ppt2fig-export
安装后,AI 就可以直接调用 PPT2Fig,把指定演示文稿的指定页面导出成 PDF。
CLI 快速上手
ppt2fig ./demo.pptx --pages 3
ppt2fig ./demo.pptx --pages 1,3,5-7 -o ./figure.pdf
ppt2fig ./demo.pptx --pages 2 --no-crop
ppt2fig ./demo.pptx --pages 2 --backend libreoffice
ppt2fig ./demo.pptx --pages 2 --backend powerpoint --powerpoint-intent print
ppt2fig --list-backends
ppt2fig --help --lang en
常用参数:
--pages:必填,支持1,3,5-7--output:输出 PDF 路径--backend:auto/libreoffice/wps/powerpoint--office-bin:手动指定后端程序路径--no-crop:不裁剪白边--percent-retain:保留部分原始边距--margin-size:裁剪后额外增加白边--threshold:背景检测阈值--powerpoint-intent:print或screen--bitmap-missing-fonts:字体无法嵌入时将文字转位图--lang:zh或en,默认zh
注意事项
- CLI 先导出整份 PDF,再抽取指定页。
--list-backends里的detected表示检测到候选程序,不一定代表当前平台已完整支持自动导出。- PowerPoint 的 PDF 导出质量受其官方导出接口限制。
系统要求
- 快速 GUI:Windows/macOS,且活动演示文稿导出流程需要可用的 Microsoft PowerPoint
- 文件模式 GUI / CLI:Windows / Linux / macOS,跨平台场景推荐安装 LibreOffice
- Python:3.6+
维护者文档
- 编译指南:
docs/BUILD.md - ClawHub 发布指南:
docs/CLAWHUB_PUBLISH.md
许可证
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppt2fig-1.2.0.tar.gz.
File metadata
- Download URL: ppt2fig-1.2.0.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cb4e48cadc1195636a5c02e0a878c06a2234bb80607677c1387bc1cc629e182
|
|
| MD5 |
deeb69968bc6877d0e06cbfd93706ed6
|
|
| BLAKE2b-256 |
1f5bb9569c7f34722316aa60cdcb67ce623c4a62c76b064101717afbef066593
|
File details
Details for the file ppt2fig-1.2.0-py3-none-any.whl.
File metadata
- Download URL: ppt2fig-1.2.0-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e17dcf31ad29c9f50c503e8d4bf8a90778fbc975d46b78ae0d8954db16065f8b
|
|
| MD5 |
6fffe420444f218b7f9e771a0e836130
|
|
| BLAKE2b-256 |
4f7bb4a77fc9053a4d1c3afe4adf30219244b945069064c52b40106b3643a4ca
|