@rishabhdugar

PDF Compress

Compress and optimize PDF files. Reduce file size with configurable compression levels, get compression statistics, upload files, and inspect PDF metadata. Powered by PDFAPIHub.

当前版本
v1.0.0
code-plugin社区source-linked

PDF Compress — OpenClaw Plugin

Compress and optimize PDF files using the PDFAPIHub API. This OpenClaw plugin gives your AI agent the ability to reduce PDF file sizes, compress images, upload files, and inspect document metadata.

What It Does

Reduce PDF and image file sizes with configurable compression — perfect for email attachments, web uploads, storage optimization, and mobile-friendly documents.

Features

  • PDF Compression — Rewrite streams, deflate content, clean unused objects
  • 4 Compression Levels — Low (light), medium (moderate), high (full, default), max (aggressive)
  • Compression Statistics — Original size, compressed size, ratio percentage, bytes saved
  • Image Compression — Compress images to JPEG with quality control (1-100)
  • File Upload — Upload files to get public URLs for processing
  • File Listing — List all uploaded files with timestamps
  • PDF Metadata — Check page count, file size, encryption status, and properties
  • Multiple Output Formats — Download URL, base64 string, or raw file
  • Auto-Cleanup — Uploaded files automatically deleted after 30 days

Tools

ToolDescription
compress_pdfReduce PDF file size with configurable compression levels
compress_imageCompress images to JPEG with quality control and stats
pdf_infoCheck file size, page count, and metadata
upload_fileUpload files to get a public URL for processing
list_filesList uploaded files

Installation

openclaw plugins install clawhub:pdf-compress

Configuration

Add your API key in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "pdf-compress": {
        "enabled": true,
        "env": {
          "PDFAPIHUB_API_KEY": "your-api-key-here"
        }
      }
    }
  }
}

Get your free API key at https://pdfapihub.com.

Usage Examples

Just ask your OpenClaw agent:

  • "Compress this PDF to reduce file size"
  • "Compress with maximum compression"
  • "How big is this PDF before and after compression?"
  • "Compress this image to 75% quality"
  • "Show me my uploaded files"

Use Cases

  • Email Attachments — Compress large PDFs to fit within email size limits
  • Web Upload Optimization — Reduce file size before uploading to portals with size restrictions
  • Storage Savings — Compress archival PDFs to reduce cloud storage costs
  • Faster Downloads — Optimize PDF size for faster user downloads
  • Mobile-Friendly — Compress PDFs for better performance on mobile devices
  • Batch Optimization — Compress all PDFs in a document management system
  • Pre-Processing — Compress images before embedding in PDF generation

Compression Levels

LevelAliasesBehaviour
lowsmallLight cleanup
mediummedModerate optimization
highdefaultFull optimization (default)
maxmaximum, aggressiveSame as high

API Documentation

Full API docs: https://pdfapihub.com/docs

License

MIT

源码与版本

源码仓库

PdfApiHub/openclaw-pdf-compress

打开仓库

源码提交

8c4746402ae6555100e776f5f56a9150537ff9a3

查看提交

安装命令

openclaw plugins install clawhub:pdf-compress

元数据

  • 包名: pdf-compress
  • 创建时间: 2026/04/17
  • 更新时间: 2026/04/17
  • 执行代码:
  • 源码标签: main

兼容性

  • 构建于 OpenClaw: 2026.3.24-beta.2
  • 插件 API 范围: >=2026.3.24-beta.2
  • 标签: latest
  • 文件数: 7