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
许可证
Metadata
Release files for ppt2fig 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ppt2fig-1.2.0.tar.gz | 25.7 kB | Without provenance | Details for ppt2fig-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ppt2fig-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for ppt2fig-1.2.0-py3-none-any.whl |
Total release size: 52.6 kB
Release files / ppt2fig-1.2.0.tar.gz
| Download URL | ppt2fig-1.2.0.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cb4e48cadc1195636a5c02e0a878c06a2234bb80607677c1387bc1cc629e182
|
|
BLAKE2b-256 checksum How to use checksums |
1f5bb9569c7f34722316aa60cdcb67ce623c4a62c76b064101717afbef066593
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / ppt2fig-1.2.0-py3-none-any.whl
| Download URL | ppt2fig-1.2.0-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e17dcf31ad29c9f50c503e8d4bf8a90778fbc975d46b78ae0d8954db16065f8b
|
|
BLAKE2b-256 checksum How to use checksums |
4f7bb4a77fc9053a4d1c3afe4adf30219244b945069064c52b40106b3643a4ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for ppt2fig 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.