Image to PDF for Openclaw

A powerful utility to intelligently merge multiple images and screenshots into professionally formatted, paginated A4 PDF documents.

wxttt
v0.1.0
Mar 12, 2026
0
950
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install smart-image-to-pdf

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install smart-image-to-pdf using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Image to PDF?

The Image to PDF skill is a specialized tool for developers and students who need to transform disparate image files, such as exam paper screenshots or document photos, into a cohesive, printable PDF format. This Openclaw Skills component goes beyond simple conversion by employing pixel-level analysis to ensure that text is never bisected by page breaks, resulting in a clean and readable layout.

By leveraging advanced image processing via Python, it automatically handles whitespace trimming and scales content to fit A4 dimensions perfectly. Whether you are archiving research notes or preparing study materials, this skill automates the tedious task of manual layout adjustment and provides a high-quality, print-ready output.

Image to PDF Use Cases

  • Combining multiple exam paper screenshots into a single, printable PDF file.
  • Merging scattered document photos into a paginated archive.
  • Stitching together long screenshots that need to be split intelligently across multiple A4 pages.
  • Automating the creation of high-quality PDF handouts from individual image assets.

How Image to PDF Works

  1. Input identification: The skill identifies the target images or directory provided by the user and extracts the desired output path.
  2. Pre-processing: It automatically trims whitespace borders and scales all images to a uniform A4-ready width.
  3. Layout Packing: Images are greedily packed onto virtual A4 pages to ensure a tight layout with minimal gaps.
  4. Intelligent Segmentation: When a page break is required, the script performs pixel analysis to find the optimal whitespace row, ensuring text lines remain intact.
  5. PDF Compilation: The final processed images are compiled into a high-quality 300 DPI PDF document ready for immediate use.

Image to PDF Setup

To use this skill within the Openclaw Skills ecosystem, ensure you have the uv tool installed for seamless dependency management. You can execute the script directly without manual installation using the following command:

uv run --with Pillow --with numpy python3 scripts/combine.py <input_path> -o <output_filename>.pdf

You can customize the output by using optional flags such as --margin <px> for page borders, --no-trim to keep original borders, and --dpi <n> for custom resolution.

Image to PDF Data Schema & Taxonomy

The skill processes local image files and generates a structured PDF output based on the following specifications:

Feature Specification
Supported Inputs Directory paths or individual image file lists (PNG, JPG, etc.)
Default Output output.pdf in the input directory
Page Size Standard A4 dimensions at 300 DPI (configurable)
Default Margin 80 pixels (~7mm) at 300 DPI
Layout Engine Greedy packing with pixel-aware text protection

Image to PDF Advanced Features

  • Intelligent Page Breaking: Utilizes pixel analysis to prevent cutting through text rows during pagination.
  • Automated Whitespace Trimming: Automatically removes unnecessary borders from screenshots to maximize content area.
  • Dynamic Scaling: Ensures all images, regardless of original size, are scaled to fit A4 printable widths.
  • Print-Ready Optimization: Defaults to 300 DPI to ensure high-fidelity output for physical printing.
  • Zero-Install Execution: Leverages uv for on-the-fly dependency management of Pillow and NumPy.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*