PDF Compressor for Openclaw

A high-performance utility for reducing PDF file sizes through adjustable optimization levels powered by PyMuPDF.

upwell
v0.1.4
Mar 4, 2026
0
898
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install pdf-compressor

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-compressor 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 Compressor?

The PDF Compressor is a technical utility designed to minimize the storage footprint of PDF documents while maintaining document integrity. By leveraging the industry-standard PyMuPDF library, this skill allows users to programmatically reduce file sizes, making it an essential component for any automated document management system within the Openclaw Skills ecosystem.

This skill is particularly useful for developers who need to integrate file optimization into their AI-driven workflows. It handles the heavy lifting of PDF internal structure optimization, allowing the agent to provide users with leaner, more portable documents for email, web, or storage purposes.

PDF Compressor Use Cases

  • Reducing high-resolution PDF sizes for faster email transmission.
  • Optimizing legacy document archives to save cloud storage costs.
  • Preparing documents for web publication to improve page load speeds.
  • Batch processing document folders to ensure uniform file size constraints.

How PDF Compressor Works

  1. The skill accepts an absolute file path and an optional compression intensity level (1-3).
  2. It utilizes the PyMuPDF runtime to analyze and process the PDF object tree.
  3. Depending on the level selected, it applies specific optimization algorithms to images, fonts, and metadata.
  4. The tool outputs a new, compressed PDF file and returns a JSON object containing performance metrics and the new file location.

PDF Compressor Setup

To use this skill, ensure you have the uv package manager installed on your system. Navigate to the skill directory and execute the following command structure:

# Run the compressor using uv
uv run src/main.py --pdf_path "/your/absolute/path/file.pdf" --compression_level 2

Ensure the input path is absolute and the runtime has write permissions to the target directory.

PDF Compressor Data Schema & Taxonomy

The PDF Compressor skill processes inputs and generates structured JSON outputs to ensure compatibility within Openclaw Skills workflows.

Input Parameters

Parameter Type Required Description
pdf_path string Yes The absolute path to the PDF to be processed.
compression_level integer No 1 (Low), 2 (Medium), 3 (High). Defaults to 2.

Output Structure

Key Type Description
status string Success or failure message.
compressed_file string Path to the newly generated file.
original_size integer File size in bytes before processing.
compressed_size integer File size in bytes after processing.

PDF Compressor Advanced Features

  • Multi-level optimization: Choose between speed and maximum reduction with three distinct levels.
  • High-speed processing: Built on PyMuPDF for rapid execution even on complex documents.
  • Seamless Integration: Designed to work within Openclaw Skills as a modular node for multi-agent chains.
  • Detailed Metrics: Provides exact byte-reduction data for analytics and reporting.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*