long-image-to-pdf
v1.0.1Slices long images/screenshots into overlapping segments and auto-arranges them into a paginated PDF.
Security Scan
OpenClaw
Benign
high confidencePurpose & 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.
Assessment
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.Like a lobster shell, security has layers — review code before you run it.
latest
Long Image to PDF Processor
When to use this skill
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.
Prerequisites
Required python packages: Pillow, reportlab.
How to use this skill
Execute the python script scripts/slice_and_pdf.py via the command line.
Command Syntax
python scripts/slice_and_pdf.py --source <path_to_image> --out-dir <output_directory> [OPTIONS]
Required Arguments
--source: Path to the source long image file. (Always use absolute paths if possible)--out-dir: Directory where the final PDF will be saved.
Optional Arguments
--pdf-name: Name of the output PDF file (default:output.pdf).--slice-height: Height of each slice in pixels (default:2000).--overlap: Overlap height between consecutive slices in pixels (default:200).--cols: Number of columns in the PDF (default:2).--rows: Number of rows in the PDF (default:2).--layout: Arrangement sequence, eithergrid(left-to-right) orcolumn(top-to-bottom) (default:grid).--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).
⚠️ Important Instructions for the Agent (Guardrails)
- Always apply
--cleanupby default, unless the user specifically says "I want the sliced pictures too". Users generally only care about the final PDF. - Absolute Paths: When constructing the command, resolve any paths (like
~or relative paths) to absolute paths to prevent execution errors. - 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 saysSTATUS: Success, tell the user the path where the PDF is saved.
Examples
Example 1: Normal conversion (Will auto-cleanup slices, 2x2 grid)
python scripts/slice_and_pdf.py --source "/Users/bob/Downloads/long_chat.png" --out-dir "/Users/bob/Desktop/Output" --cleanup
Example 2: Customizing to 1 column, 3 rows, keeping intermediate slices
python scripts/slice_and_pdf.py --source "/abs/path/webpage.jpg" --out-dir "./results" --cols 1 --rows 3
Comments
Loading comments...
