← 返回
效率工具 中文

Smart Image to PDF

Combine multiple image screenshots into a paginated A4 PDF. Intelligently handles page breaks to avoid cutting through text. Use when the user wants to combi...
将多张截图合并成分页的A4 PDF,智能处理分页,避免文字被切断。适用于用户想要将多张图片合并为一个 PDF 的场景。
wxttt
效率工具 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 553
下载
💾 10
安装
1
版本
#latest

概述

Image to PDF

Combine multiple image screenshots (typically exam paper questions) into a well-formatted, paginated A4 PDF that is ready for printing.

When to Use

Trigger this skill when the user wants to:

  • Combine / merge / stitch images into a PDF
  • Put screenshots together into a printable document
  • Create a PDF from exam paper photos or screenshots
  • Pack question images onto A4 pages for printing

Look for phrases like: "拼到一起", "合成PDF", "拼接", "打印", "combine images", "merge into PDF", etc.

How to Use

This skill includes a Python script at scripts/combine.py (relative to this SKILL.md).

Step 1: Identify inputs and output

From the user's request, extract:

  • Input: a directory path or list of image file paths
  • Output: the desired PDF output path (default: output.pdf in the input directory)

Step 2: Run the script

Use uv run to handle dependencies automatically (no manual install needed):

uv run --with Pillow --with numpy python3 <path-to-this-skill>/scripts/combine.py <input> -o <output.pdf>

Input formats:

  • A directory: python scripts/combine.py ./my_images/ -o result.pdf
  • Multiple files: python scripts/combine.py img1.png img2.png -o result.pdf

Optional flags:

  • --margin : page margin in pixels at 300dpi (default: 80, ~7mm)
  • --no-trim: disable automatic whitespace border trimming
  • --dpi : output DPI (default: 300)

Step 4: Report result

Tell the user:

  • How many images were processed
  • How many PDF pages were generated
  • The output file path

What the Script Does

  1. Loads images, auto-trims whitespace borders
  2. Scales all images to the same width (A4 printable width)
  3. Greedily packs images onto A4 pages (tight layout, no gaps)
  4. When a page break is needed, uses pixel analysis to find whitespace rows so text is never cut
  5. Outputs a 300 DPI PDF ready for printing

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-30 01:34 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Remove Watermark

wxttt
去除白色背景文档图像(试卷、扫描件)中的浅色文字水印。无需API密钥,纯本地图像处理。
★ 0 📥 835
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,487
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,802