PyMuPDF Skill for Openclaw

A high-performance utility for rendering PDF pages to images and extracting embedded document assets.

maverick-ai-tech
v1.0.0
Feb 27, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install pymupdf

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 pymupdf 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 PyMuPDF Skill?

The PyMuPDF skill is a specialized tool designed for AI agents to handle complex PDF visual tasks that require high-fidelity output. By utilizing the fitz library via a standardized CLI, this skill enables agents to perform deterministic operations like converting pages to raster images and retrieving raw embedded graphics. It is a vital component for developers building workflows within the Openclaw Skills framework who need more than just simple text extraction.

While other tools focus on document structure, this skill excels at visual representation. It allows for granular control over rendering resolution, page selection, and output formats, ensuring that AI agents can accurately "see" and process the contents of a PDF through image-based analysis or asset recovery.

PyMuPDF Skill Use Cases

  • Generating high-resolution PNG or JPG previews of specific PDF pages for visual inspection.
  • Extracting original, raw image assets like logos and photos embedded within a document.
  • Auditing document dimensions and metadata to ensure print or web compatibility.
  • Preparing document pages for downstream OCR or computer vision processing tasks.

How PyMuPDF Skill Works

  1. The AI agent identifies the target PDF file path and ensures local accessibility.
  2. The agent invokes the pymupdf_cli.py script with specific arguments such as export-images or extract-images.
  3. The skill processes the document using the PyMuPDF engine, applying user-defined DPI and page ranges.
  4. Results are either saved as image files in a specified directory or returned as structured metadata via stdout.

PyMuPDF Skill Setup

To use this skill, ensure you have Python 3 installed and the required library dependency configured.

# Install the PyMuPDF library
pip install pymupdf

# Verify the CLI script is accessible
python scripts/pymupdf_cli.py --help

PyMuPDF Skill Data Schema & Taxonomy

The skill organizes output based on the operation type to maintain clear document lineage:

Output Type Format Naming Convention
Page Renders PNG, JPG, PPM page_{index}.{format}
Extracted Assets Raw Image Streams page_{p_idx}img{i_idx}.{ext}
Document Info Text/Stdout Contains page counts, dimensions, and format details

PyMuPDF Skill Advanced Features

  • Customizable DPI settings (default 150) for balancing image quality and file size.
  • Targeted page processing using 0-indexed page lists to reduce compute overhead.
  • Support for multiple raster output formats including PNG, JPG, and PPM.
  • Detailed document inspection for analyzing page boundaries and internal structures.
  • Seamless integration for Openclaw Skills users needing high-fidelity visual data.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*