image2pdf

将一张或多张图像文件或图像文件夹转换为单个 PDF 的工具,适用于将 PNG、JPEG/JPG、WebP、TIFF、BMP 或 GIF 转为 PDF 页面,合并扫描件或截图,并按显式输入顺序或对目录自然排序生成页面,或适配至 A4、Letter、Legal 等页面尺寸。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "image2pdf":https://skillpi.com/zh/skills/deepskill-7b00d52e49529ed506d43222b8ef96961857db19212e12a3007d7877d8ddfad1。安装前核对上游来源和版本:https://skillhub.cn/skills/user_a808bed4/image2pdf。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

将一张或多张图像文件或图像文件夹转换为单个 PDF 的工具,适用于将 PNG、JPEG/JPG、WebP、TIFF、BMP 或 GIF 转为 PDF 页面,合并扫描件或截图,并按显式输入顺序或对目录自然排序生成页面,或适配至 A4、Letter、Legal 等页面尺寸。

0 下载

介绍来源: third_party · user_a808bed4 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: image-to-pdf
description: Convert one image, multiple image files, or folders of images into a single PDF. Use when Codex needs to turn PNG, JPEG/JPG, WebP, TIFF, BMP, or GIF files into PDF pages; combine scans, screenshots, photos, or numbered images; preserve explicit input order or naturally sort directory contents; or fit images onto auto-sized, A4, Letter, or Legal pages.

Image to PDF

Use scripts/images_to_pdf.py for deterministic conversion. It accepts files and directories together, applies EXIF orientation, flattens transparency, and writes one image per PDF page.

Workflow

  1. Resolve the requested inputs and output path. Do not modify source images.
  2. Preserve the user's explicit file/directory order. Within each directory, rely on the script's natural filename sort (2.jpg before 10.jpg).
  3. Choose page handling:
    • Use --page-size auto by default to give every image a page matching its dimensions.
    • Use --page-size a4, letter, or legal only when the user requests a uniform paper size or print-ready output.
    • Use --fit contain by default for paper pages. Use fill only when edge cropping is acceptable, or stretch only when distortion is explicitly wanted.
  4. Run the converter with the bundled Codex Python runtime when available; otherwise use python.
  5. Validate the result with pypdf (page count and readable MediaBoxes). For visual confidence, render representative pages with Poppler and inspect them, especially when using paper sizes, margins, transparency, or fill.
  6. Return the final PDF path and state its page count.

Commands

Convert one image:

python scripts/images_to_pdf.py "C:\path\scan.png" -o "C:\path\scan.pdf"

Combine explicit files in the given order:

python scripts/images_to_pdf.py "cover.png" "page2.jpg" "page3.webp" -o "book.pdf"

Combine a directory in natural filename order:

python scripts/images_to_pdf.py "C:\path\images" -o "C:\path\images.pdf"

Create uniform A4 pages with 10 mm margins:

python scripts/images_to_pdf.py "C:\path\images" -o "C:\path\print.pdf" --page-size a4 --margin-mm 10

Use --recursive to include nested directories, --overwrite to replace an existing output, --background white (or another Pillow color) when flattening transparent images, and --dpi to control physical sizing and raster resolution. Run python scripts/images_to_pdf.py --help for all options.

Dependency fallback

The script requires Pillow. If unavailable, install it into the active environment with python -m pip install Pillow. Validation uses pypdf; rendering uses Poppler (pdftoppm) when available.

Safety and quality

  • Refuse an empty input set or an output path that aliases an input image.
  • Do not silently overwrite an existing PDF; add --overwrite only when replacement is intended.
  • Avoid fill for documents containing edge text because it crops.
  • Prefer a light background for screenshots and transparent PNGs unless the user specifies otherwise.

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 解决图像转 PDF 的通用需求,支持 PNG/JPEG/WebP/TIFF/BMP/GIF 等多种格式
  • 适用于扫描件、截图、照片合并等高频场景,实用性强
触发精准95/100

亮点

  • 触发描述详尽,覆盖多种图像格式和页面尺寸需求
  • 使用场景边界清晰,不易误触或漏触
结构规范95/100

待提升项

  • 文档过长 原报告严重程度:轻微

    SKILL.md 文件共 637 行,超过建议的 500 行限制

    改进建议:可考虑将部分命令示例或详细说明移至独立文档,保持主文件简洁

亮点

  • 结构清晰,包含完整的工作流、命令示例和安全说明
  • 提供多个端到端示例,frontmatter 完整规范
执行可靠90/100

亮点

  • 工具来源明确,参数说明完整,覆盖主要异常场景
  • 具备健全的验证机制(pypdf 校验 + Poppler 渲染)和依赖回退方案
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 52 行

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。