Extract PDF Text for Openclaw

A high-performance skill for extracting text, tables, and structured data from PDF files using PyMuPDF.

ivangdavila
v1.0.2
Feb 19, 2026
0
2.5k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install extract-pdf-text

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 extract-pdf-text 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 Extract PDF Text?

The Extract PDF Text skill leverages the power of PyMuPDF (fitz) to provide a robust framework for PDF text extraction. It is designed for developers and AI agents who need to handle text-based documents, scanned images, and complex layouts locally. By integrating this into Openclaw Skills, users benefit from lightning-fast extraction speeds and a privacy-first approach that ensures no data leaves the local machine during processing.

Extract PDF Text Use Cases

  • Automating the extraction of text from large batches of PDF documents.
  • Processing scanned documents using OCR fallback logic for improved accuracy.
  • Extracting structured data like tables and forms into JSON or dictionary formats for downstream analysis.
  • Building local search indexes or RAG pipelines for large PDF libraries.

How Extract PDF Text Works

  1. Initialize the document object using the fitz (PyMuPDF) library to open the target file.
  2. Iterate through each page of the PDF to analyze the existing text content.
  3. Determine if OCR is necessary based on the character count of the extracted text to handle scanned pages.
  4. Execute the chosen extraction method, which can range from plain text to structured dict or JSON formats.
  5. Aggregate the page-level data and close the document to ensure efficient memory management.

Extract PDF Text Setup

To use this within the Openclaw Skills framework, you must first install the required Python dependency:

pip install PyMuPDF

Once installed, you can import the library as fitz to begin processing documents locally.

Extract PDF Text Data Schema & Taxonomy

The skill organizes extracted content into a structured format for easy parsing. Below is the typical schema for extracted results:

Field Type Description
page integer The page number (1-indexed)
text string The raw text content extracted from the page
method string The method used (e.g., text or needs_ocr)
word_count integer Total words detected across the entire document
content list An array of page objects containing text and metadata

For complex layouts, the skill can export a structured dict including font sizes and span types.

Extract PDF Text Advanced Features

  • Intelligent OCR detection that automatically identifies scanned pages with low text density.
  • Precise layout preservation using block-level extraction to maintain reading flow.
  • Local-only processing architecture to ensure data privacy and security for sensitive documents.
  • Robust error handling for encrypted or corrupted PDF files.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*