← 返回 Skills 市场
byronleeeee

long-image-to-pdf

作者 ByronLeeeee · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
112
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install long-image-to-pdf
功能描述
Slices long images/screenshots into overlapping segments and auto-arranges them into a paginated PDF.
使用说明 (SKILL.md)

\r \r

Long Image to PDF Processor\r

\r

When to use this skill\r

Use this skill when the user provides a very long image (like a long chat screenshot or a full webpage capture) and wants to convert it into a well-formatted PDF document. \r \r

Prerequisites\r

Required python packages: Pillow, reportlab.\r \r

How to use this skill\r

Execute the python script scripts/slice_and_pdf.py via the command line.\r \r

Command Syntax\r

python scripts/slice_and_pdf.py --source \x3Cpath_to_image> --out-dir \x3Coutput_directory> [OPTIONS]\r
```\r
\r
### Required Arguments\r
* `--source`: Path to the source long image file. **(Always use absolute paths if possible)**\r
* `--out-dir`: Directory where the final PDF will be saved.\r
\r
### Optional Arguments\r
* `--pdf-name`: Name of the output PDF file (default: `output.pdf`).\r
* `--slice-height`: Height of each slice in pixels (default: `2000`).\r
* `--overlap`: Overlap height between consecutive slices in pixels (default: `200`).\r
* `--cols`: Number of columns in the PDF (default: `2`).\r
* `--rows`: Number of rows in the PDF (default: `2`).\r
* `--layout`: Arrangement sequence, either `grid` (left-to-right) or `column` (top-to-bottom) (default: `grid`).\r
* `--cleanup`: Add this flag to automatically delete the intermediate image slices after the PDF is created. (Highly recommended to save disk space unless the user explicitly asks to keep the sliced images).\r
\r
## ⚠️ Important Instructions for the Agent (Guardrails)\r
1. **Always apply `--cleanup`** by default, unless the user specifically says "I want the sliced pictures too". Users generally only care about the final PDF.\r
2. **Absolute Paths**: When constructing the command, resolve any paths (like `~` or relative paths) to absolute paths to prevent execution errors.\r
3. **DO NOT attempt to read the output PDF**: The resulting file is a visual/binary PDF. Do not try to `cat`, `read`, or use text-extraction tools on the final PDF to verify it. Just read the command line standard output (STDOUT); if it says `STATUS: Success`, tell the user the path where the PDF is saved.\r
\r
## Examples\r
\r
**Example 1: Normal conversion (Will auto-cleanup slices, 2x2 grid)**\r
```bash\r
python scripts/slice_and_pdf.py --source "/Users/bob/Downloads/long_chat.png" --out-dir "/Users/bob/Desktop/Output" --cleanup\r
```\r
\r
**Example 2: Customizing to 1 column, 3 rows, keeping intermediate slices**\r
```bash\r
python scripts/slice_and_pdf.py --source "/abs/path/webpage.jpg" --out-dir "./results" --cols 1 --rows 3\r
安全使用建议
This skill appears coherent and local-only. Before installing, ensure you have Python and the Pillow and reportlab packages installed. The script will read the source image and write slices and a PDF to the out-dir you specify; if you allow --cleanup (the skill recommends it by default) it will delete intermediate slice images. Run the script in a directory you control (to avoid clutter or permission issues). There are no network calls or credential requests, but as with any third-party script, review the code if you have concerns and do not run it on sensitive systems without inspection.
功能分析
Type: OpenClaw Skill Name: long-image-to-pdf Version: 1.0.1 The skill is a legitimate utility for slicing long images and converting them into paginated PDFs using the Pillow and reportlab libraries. The Python script (scripts/slice_and_pdf.py) follows standard file-handling practices, and the instructions in SKILL.md provide helpful operational guardrails for the AI agent without any signs of malicious intent or prompt injection.
能力评估
Purpose & Capability
Name/description (slice long images -> PDF) align with the included script and SKILL.md. The script implements slicing, layout into pages, and PDF generation with reportlab/Pillow — all expected for this functionality.
Instruction Scope
SKILL.md instructs running the local Python script with explicit source/out-dir arguments, recommends absolute paths, and directs the agent to rely on the script's stdout for success. The instructions do not ask the agent to read unrelated files, environment variables, or send data externally.
Install Mechanism
No install spec; this is an instruction-only skill with one readable Python file. It requires standard Python packages (Pillow, reportlab) mentioned in the README. No downloads from untrusted URLs or archives are performed.
Credentials
No environment variables, credentials, or config paths are required or accessed. The script only reads the supplied image path and writes output files in the provided directory.
Persistence & Privilege
The skill does not request always:true, does not alter other skills or global agent config, and only performs file operations within the user-specified output directory. Autonomous invocation defaults are unchanged and acceptable for this purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install long-image-to-pdf
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /long-image-to-pdf 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- No user-facing changes in this version. - No file changes were detected. - Functionality and usage remain unchanged from the previous version.
v1.0.0
- Initial release of "long-image-to-pdf" skill. - Slices long images (e.g., chat screenshots, web page captures) into overlapping segments and arranges them in a paginated PDF. - Supports custom slice height, overlap amount, grid layout (columns, rows), and output file naming. - Includes automatic cleanup of intermediate slices by default. - Provides clear command-line usage instructions and best practices, such as always using absolute paths.
元数据
Slug long-image-to-pdf
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

long-image-to-pdf 是什么?

Slices long images/screenshots into overlapping segments and auto-arranges them into a paginated PDF. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 112 次。

如何安装 long-image-to-pdf?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install long-image-to-pdf」即可一键安装,无需额外配置。

long-image-to-pdf 是免费的吗?

是的,long-image-to-pdf 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

long-image-to-pdf 支持哪些平台?

long-image-to-pdf 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 long-image-to-pdf?

由 ByronLeeeee(@byronleeeee)开发并维护,当前版本 v1.0.1。

💬 留言讨论