PDF Tool for Openclaw

A comprehensive PyPDF2-based utility for programmatically splitting, merging, watermarking, and extracting text from PDF documents.

martin-sh-ni
v1.0.0
Apr 12, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install pdf-tool

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 pdf-tool 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 PDF Tool?

PDF Tool is a robust utility designed for high-efficiency document manipulation within the Openclaw Skills ecosystem. Powered by the PyPDF2 library, this skill provides developers and AI agents with the ability to handle complex PDF operations without needing a heavy GUI or proprietary software. It excels at processing large batches of files, ensuring that metadata and structural integrity remain intact during common tasks like joining reports or securing documents with custom overlays.

By integrating this skill, users can automate the repetitive labor associated with document management. Whether you are building a legal tech application that requires contract merging or a data extraction pipeline that needs to pull raw text from thousands of whitepapers, PDF Tool offers a clean, programmatic interface to get the job done quickly and reliably.

PDF Tool Use Cases

  • Merging multiple individual contract files or reports into a single, unified PDF document.
  • Splitting large e-books or documentation sets into individual chapters or page ranges for easier distribution.
  • Protecting intellectual property by applying text-based watermarks such as "Confidential" or "Draft" across all pages.
  • Automating data entry pipelines by extracting raw text content from PDF invoices or legal agreements.

How PDF Tool Works

  1. The user or AI agent invokes the skill by specifying a target mode: split, merge, watermark, or extract_text.
  2. The skill loads the source PDF files into memory using the PyPDF2 engine.
  3. Depending on the mode, the skill performs page-level manipulation (for splitting/merging), applies a text layer (for watermarking), or parses the object tree (for text extraction).
  4. The processed data is either written to the specified output path or returned as a text string in the response.
  5. A success flag and status message are returned to confirm the completion of the operation.

PDF Tool Setup

To use this tool within your environment, ensure you have the necessary dependencies installed via pip:

pip install PyPDF2>=3.0.0

Once the dependency is met, the skill can be registered and called within your Openclaw Skills configuration by referencing the pdf_tool function.

PDF Tool Data Schema & Taxonomy

The skill utilizes a standard dictionary-based input and output schema to ensure compatibility across different automation scripts:

Parameter Type Description
mode String The operation to perform: split, merge, watermark, or extract_text.
files List A list of strings representing the file paths to be processed.
output String The destination file path for the generated PDF (required for merge/split/watermark).
watermark String The specific text to be used as a watermark overlay.

Output Structure:

  • success: Boolean indicating if the operation was completed.
  • text/msg: Contains the extracted text content or a status message regarding the file generation.

PDF Tool Advanced Features

  • Multi-file merging support allows for an unlimited number of source PDFs to be joined in a single execution.
  • High-fidelity text extraction capable of pulling pure text content for downstream NLP or LLM processing.
  • Programmatic watermarking enables dynamic, user-specific security overlays for document protection.
  • Seamless integration with wider Openclaw Skills workflows, allowing for automated document processing chains.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*