How to Compress PDFs with OpenClaw

Batch compress PDFs with OpenClaw and ToolRouter. Automate PDF optimisation across document libraries.

Tool
Compress icon
Compress

OpenClaw automates PDF compression across large document collections — optimise a backlog of stored files, compress newly generated reports on a schedule, and maintain a size-optimised archive without manual processing.

Connect ToolRouter to OpenClaw

1Install the CLI
npm install -g toolrouter-mcp
2Call tools directly from OpenClaw
toolrouter-mcp call web-search search --query "AI tools"
toolrouter-mcp tools

Steps

Once connected (see setup above), use the Compress tool:

  1. Provide a list of PDF URLs: "Compress all these PDFs"
  2. OpenClaw processes each file and returns compressed download links
  3. Log size reductions and store compressed file URLs
  4. Route the optimised files to your storage or distribution system

Example Prompt

Try this with OpenClaw using the Compress tool
Compress all PDFs in this list and return a summary of original size, compressed size, and percentage reduction for each: [list of URLs].

Tips

  • Run compression on your entire PDF archive to identify and resolve oversized files
  • Schedule PDF compression to run automatically after documents are generated
  • Track cumulative size savings to quantify storage cost reduction over time