Pdf splitter ocr

From XSpoonAi/spoon-awesome-skill · View interactive version

Pdf splitter ocr is an AI agent skill from the GitHub repository XSpoonAi/spoon-awesome-skill. Split PDF documents and perform optical character recognition (OCR) for text extraction and searchability. Supports batch processing and text indexing.

How to use this skill

Skill file

Description

Split PDF documents and perform optical character recognition (OCR) for text extraction and searchability. Supports batch processing and text indexing.

Inputs

{
  "pdf_path": "Path to PDF file",
  "action": "split|ocr|extract",
  "pages": "1-5|all"
}

Outputs

{
  "ok": true,
  "data": {
    "text": "Extracted text",
    "pages": 5
  }
}

Usage

Demo Mode

python scripts/main.py --demo

Extract Text

echo '{"pdf_path":"document.pdf","action":"extract"}' | python3 scripts/main.py

Examples

Example 1: OCR PDF

$ echo '{"pdf_path":"document.pdf","action":"ocr","pages":"1-3"}' | python3 scripts/main.py
{
  "ok": true,
  "data": {
    "text": "Extracted text content...",
    "pages": 3
  }
}

Error Handling

When an error occurs, the skill returns:

{
  "ok": false,
  "error": "Error description",
  "details": {
    "pdf_path": "File not found"
  }
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.