← Back to Skills Marketplace
byronleeeee

long-image-to-pdf

by ByronLeeeee · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
112
Downloads
1
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install long-image-to-pdf
Description
Slices long images/screenshots into overlapping segments and auto-arranges them into a paginated PDF.
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install long-image-to-pdf
  3. After installation, invoke the skill by name or use /long-image-to-pdf
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug long-image-to-pdf
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is long-image-to-pdf?

Slices long images/screenshots into overlapping segments and auto-arranges them into a paginated PDF. It is an AI Agent Skill for Claude Code / OpenClaw, with 112 downloads so far.

How do I install long-image-to-pdf?

Run "/install long-image-to-pdf" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is long-image-to-pdf free?

Yes, long-image-to-pdf is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does long-image-to-pdf support?

long-image-to-pdf is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created long-image-to-pdf?

It is built and maintained by ByronLeeeee (@byronleeeee); the current version is v1.0.1.

💬 Comments