← 返回 Skills 市场
842
总下载
0
收藏
7
当前安装
1
版本数
在 OpenClaw 中安装
/install pdf-to-image-preview
功能描述
将PDF文件的每一页转换为图片文件;支持自定义图片格式(PNG/JPG)和分辨率;适用于文档处理、图片化存档等场景
使用说明 (SKILL.md)
PDF转图片Skill
任务目标
- 本Skill用于:将PDF文件的每一页转换为独立的图片文件
- 能力包含:PDF文件解析、图片格式转换(PNG/JPG)、可调分辨率输出
- 触发条件:用户需要将PDF转换为图片、提取PDF页面、图片化PDF内容等场景
前置准备
- 依赖说明:scripts脚本所需的依赖包及版本
pymupdf>=1.23.0
操作步骤
- 标准流程:
-
准备PDF文件
- 确认PDF文件路径(使用
./表示当前工作目录) - 例如:
./document.pdf
- 确认PDF文件路径(使用
-
执行转换
- 调用脚本将PDF文件的每一页转换为图片
- 命令示例:
python scripts/convert_pdf_to_images.py \ --input ./document.pdf \ --output-dir ./images - 可选参数:
--image-format: 图片格式,支持png或jpg,默认为png--dpi: 图片分辨率(DPI),默认为200--zip: 生成ZIP压缩包--zip-output: ZIP压缩包输出路径(默认:images.zip)
-
查看输出
- 图片文件保存在指定的输出目录中
- 文件命名格式:
page_001.png、page_002.png... - 可选择是否生成ZIP压缩包
-
资源索引
- 必要脚本:见 scripts/convert_pdf_to_images.py(用途与参数:PDF转图片脚本)
注意事项
- 输入PDF文件必须存在且可读
- 输出目录必须具有写入权限
- PDF页数限制:暂支持100页以内的PDF文件,超过100页请拆分后转换
- 大型PDF文件转换可能需要较长时间,请耐心等待
故障排查
- 脚本找不到错误:确保在Skill目录下执行,或使用相对路径
scripts/xxx.py - Python版本问题:确保使用Python 3.6或更高版本
- 依赖缺失:执行
pip install pymupdf>=1.23.0安装依赖 - 页数超限错误:PDF文件超过100页,请使用PDF工具拆分为多个小文件
使用示例
示例1:基本转换(PNG格式)
python scripts/convert_pdf_to_images.py \
--input ./report.pdf \
--output-dir ./images
示例2:使用JPG格式
python scripts/convert_pdf_to_images.py \
--input ./document.pdf \
--output-dir ./images \
--image-format jpg
示例3:高分辨率输出
python scripts/convert_pdf_to_images.py \
--input ./document.pdf \
--output-dir ./images \
--dpi 300
示例4:生成ZIP压缩包
python scripts/convert_pdf_to_images.py \
--input ./document.pdf \
--output-dir ./images \
--zip \
--zip-output ./images.zip
示例5:完整配置
python scripts/convert_pdf_to_images.py \
--input ./report.pdf \
--output-dir ./images \
--image-format jpg \
--dpi 200 \
--zip
安全使用建议
This skill is internally coherent and appears to implement the promised PDF → image functionality without requesting credentials or network access. Before installing: (1) note the docs mismatch — the usage guide mentions a different script name and an --html-output option that the included script does not implement; treat this as a documentation bug. (2) Install pymupdf from a trusted source (pip from PyPI) and run the script in a sandbox or with non-sensitive PDFs first. (3) Respect the 100-page limit and ensure you have write permissions and sufficient disk space. (4) If you need HTML preview generation, either implement it yourself or ask the publisher for the correct script/version. If any unexpected network activity appears when running the script, stop and investigate.
功能分析
Type: OpenClaw Skill
Name: pdf-to-image-preview
Version: 0.1.0
The skill bundle provides a straightforward utility for converting PDF pages into images using the PyMuPDF library. The Python script (scripts/convert_pdf_to_images.py) implements standard file handling, resource limiting (100-page cap), and optional ZIP compression without any network activity, sensitive data access, or suspicious execution patterns.
能力评估
Purpose & Capability
The name/description match the included script: scripts/convert_pdf_to_images.py converts PDF pages to PNG/JPG and supports DPI and ZIP output; the SKILL.md correctly declares the pymupdf dependency. Minor inconsistency: references/usage-guide.md and some examples mention a different script name (pdf_to_images.py) and an --html-output option that is not implemented in the provided script. This appears to be documentation drift rather than a functional mismatch with required capabilities.
Instruction Scope
Runtime instructions are limited and explicit: run the included Python script with input/output paths and optional --zip. The script only reads the specified PDF and writes image files/ZIP in the output dir. There are no instructions to read unrelated files, environment variables, or to send data externally. The only concern is the documentation examples that reference an unimplemented --html-output option and a different script path, which could confuse users but do not expand runtime scope.
Install Mechanism
No install spec is provided (instruction-only plus bundled script). The only dependency is PyMuPDF (pymupdf) which is a normal Python package—no arbitrary downloads, extract actions, or external installers are present in the bundle.
Credentials
The skill requires no environment variables, credentials, or config paths. The script operates on local files only, so the requested environment access is minimal and proportionate to its stated purpose.
Persistence & Privilege
The skill does not request always: true, does not persist configuration, and does not modify other skills or global agent settings. It runs on-demand and has no autonomous persistence requirements.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install pdf-to-image-preview - 安装完成后,直接呼叫该 Skill 的名称或使用
/pdf-to-image-preview触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of pdf-to-image-preview.
- Converts each page of a PDF file into separate image files (supports PNG/JPG output).
- Allows custom image resolution (DPI) and format selection.
- Optionally generates a ZIP archive of output images.
- Supports PDF files up to 100 pages; large PDFs should be split before conversion.
- Provides clear usage examples, troubleshooting tips, and script-based workflow.
- Requires Python 3.6+ and pymupdf>=1.23.0.
元数据
常见问题
Pdf To Image Preview 是什么?
将PDF文件的每一页转换为图片文件;支持自定义图片格式(PNG/JPG)和分辨率;适用于文档处理、图片化存档等场景. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 842 次。
如何安装 Pdf To Image Preview?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install pdf-to-image-preview」即可一键安装,无需额外配置。
Pdf To Image Preview 是免费的吗?
是的,Pdf To Image Preview 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Pdf To Image Preview 支持哪些平台?
Pdf To Image Preview 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Pdf To Image Preview?
由 无处不在(@wuchubuzai2018)开发并维护,当前版本 v0.1.0。
推荐 Skills