ocr-document-processor

Extract text from images and scanned PDFs with support for 100+ languages, table detection, and multiple output formats.

dkyazzentwatwa/chatgpt-skillsUpdated May 12, 2026

Works with

Claude CodeCursorClineWindsurfCodexGooseGitHub CopilotZed

1

total installs

1

this week

43

GitHub stars

0

upvotes

Install Skill

Run in your terminal

$npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill ocr-document-processor

1

installs

1

this week

43

stars

What it does

  • Handles PNG, JPEG, TIFF, BMP images and multi-page PDFs with per-page or full-document extraction

  • Supports 100+ languages with auto-detection, language-specific packs, and multi-language document processing

  • Exports to plain text, Markdown, JSON, HTML, and searchable PDFs with confidence scoring and bounding box data

  • Includes intelligent preprocessing (deskew, de

Category

Documents

Last updated

May 12, 2026

Installation Guide

How to use ocr-document-processor on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your machine
  • Node.js 16+ with npm — verify with node --version
  • Active project directory where you want to add ocr-document-processor
2

Run the install command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill ocr-document-processor

Fetches ocr-document-processor from dkyazzentwatwa/chatgpt-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI shows a list of agents. Use arrow keys and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ────────────────
│ · Cline · Codex · Goose · Windsurf
│ ●Cursor(selected)
│ · Cursor · Aider · Continue
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/ocr-document-processor

Restart Cursor to activate ocr-document-processor. Access via /ocr-document-processor in your agent's command palette.

Security Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.

Documentation

OCR Document Processor

Extract text from images, scanned PDFs, and photographs using Optical Character Recognition (OCR). Supports multiple languages, structured output formats, and intelligent document parsing.

Core Capabilities

  • Image OCR: Extract text from PNG, JPEG, TIFF, BMP images
  • PDF OCR: Process scanned PDFs page by page
  • Multi-language: Support for 100+ languages
  • Structured Output: Plain text, Markdown, JSON, or HTML
  • Table Detection: Extract tabular data to CSV/JSON
  • Batch Processing: Process multiple documents at once
  • Quality Assessment: Confidence scoring for OCR results

Quick Start

from scripts.ocr_processor import OCRProcessor

# Simple text extraction
processor = OCRProcessor("document.png")
text = processor.extract_text()
print(text)

# Extract to structured format
result = processor.extract_structured()
print(result['text'])
print(result['confidence'])
print(result['blocks'])  # Text blocks with positions

Core Workflow

1. Basic Text Extraction

from scripts.ocr_processor import OCRProcessor

# From image
processor = OCRProcessor("scan.png")
text = processor.extract_text()

# From PDF
processor = OCRProcessor("scanned.pdf")
text = processor.extract_text()  # All pages

# Specific pages
text = processor.extract_text(pages=[1, 2, 3])

2. Structured Extraction

# Get detailed results
result = processor.extract_structured()

# Result contains:
# - text: Full extracted text
# - blocks: Text blocks with bounding boxes
# - lines: Individual lines
# - words: Individual words with confidence
# - confidence: Overall confidence score
# - language: Detected language

3. Export Formats

# Export to Markdown
processor.export_markdown("output.md")

# Export to JSON
processor.export_json("output.json")

# Export to searchable PDF
processor.export_searchable_pdf("searchable.pdf")

# Export to HTML
processor.export_html("output.html")

Language Support

# Specify language for better accuracy
processor = OCRProcessor("german_doc.png", lang='deu')

# Multiple languages
processor = OCRProcessor("mixed_doc.png", lang='eng+fra+deu')

# Auto-detect language
processor = OCRProcessor("document.png", lang='auto')

Supported Languages (Common)

Code Language Code Language
eng English fra French
deu German spa Spanish
ita Italian por Portuguese
rus Russian chi_sim Chinese (Simplified)
chi_tra Chinese (Traditional) jpn Japanese
kor Korean ara Arabic
hin Hindi nld Dutch

Image Preprocessing

Preprocessing improves OCR accuracy on low-quality images.

# Enable preprocessing
processor = OCRProcessor("noisy_scan.png")
processor.preprocess(
    deskew=True,        # Fix rotation
    denoise=True,       # Remove noise
    threshold=True,     # Binarize image
    contrast=1.5        # Enhance contrast
)
text = processor.extract_text()

Available Preprocessing Options

Option Description Default
deskew Correct skewed/rotated images False
denoise Remove noise and artifacts False
threshold Convert to black/white False
threshold_method 'otsu', 'adaptive', 'simple' 'otsu'
contrast Contrast factor (1.0 = no change) 1.0
sharpen Sharpen factor (0 = none) 0
scale Upscale factor for small text 1.0
remove_shadows Remove shadow artifacts False

Table Extraction

# Extract tables from document
tables = processor.extract_tables()

# Each table is a list of rows
for table in tables:
    for row in table:
        print(row)

# Export tables to CSV
processor.export_tables_csv("tables/")

# Export to JSON
processor.export_tables_json("tables.json")

PDF Processing

Multi-Page PDFs

# Process all pages
processor = OCRProcessor("document.pdf")
full_text = processor.extract_text()

# Process specific pages
page_3 = processor.extract_text(pages=[3])

# Get per-page results
results = processor.extract_by_page()
for page_num, text in results.items():
    print(f"Page {page_num}: {len(text)} characters")

Create Searchable PDF

# Convert scanned PDF to searchable PDF
processor = OCRProcessor("scanned.pdf")
processor.export_searchable_pdf("searchable.pdf")

Batch Processing

from scripts.ocr_processor import batch_ocr

# Process directory of images
results = batch_ocr(
    input_dir="scans/",
    output_dir="extracted/",
    output_format="markdown",
    lang="eng",
    recursive=True
)

print(f"Processed: {results['success']} files")
print(f"Failed: {results['failed']} files")

Receipt/Document Parsing

Receipt Extraction

# Parse receipt structure
processor = OCRProcessor("receipt.jpg")
receipt_data = processor.parse_receipt()

# Returns structured data:
# - vendor: Store name
# - date: Transaction date
# - items: List of items with prices
# - subtotal: Subtotal amount
# - tax: Tax amount
# - total: Total amount

Business Card Parsing

# Extract business card info
processor = OCRProcessor("card.jpg")
contact = processor.parse_business_card()

# Returns:
# - name: Person's name
# - title: Job title
# - company: Company name
# - email: Email addresses
# - phone: Phone numbers
# - address: Physical address
# - website: Website URLs

Configuration

processor = OCRProcessor("document.png")

# Configure OCR settings
processor.config.update({
    'psm': 3,           # Page segmentation mode
    'oem': 3,           # OC

List & Monetize Your Skill

Submit your Claude Code skill and start earning

Get started →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Steps

  1. 1Install skill using provided installation command
  2. 2Test with simple use case relevant to your work
  3. 3Evaluate output quality and relevance
  4. 4Iterate on prompts to improve results
  5. 5Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use when

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid when

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Related Skills

Reviews

4.561 reviews
  • C
    Chen MartinDec 28, 2024

    ocr-document-processor has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • S
    Sophia ReddyDec 24, 2024

    Keeps context tight: ocr-document-processor is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • A
    Amelia GarciaDec 20, 2024

    ocr-document-processor reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Z
    Zaid GhoshDec 16, 2024

    Useful defaults in ocr-document-processor — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • C
    Chaitanya PatilDec 12, 2024

    Useful defaults in ocr-document-processor — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • A
    Arjun BansalDec 12, 2024

    ocr-document-processor fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • F
    Fatima GonzalezDec 8, 2024

    Registry listing for ocr-document-processor matched our evaluation — installs cleanly and behaves as described in the markdown.

  • K
    Kwame HarrisDec 4, 2024

    Registry listing for ocr-document-processor matched our evaluation — installs cleanly and behaves as described in the markdown.

  • A
    Amelia JohnsonNov 19, 2024

    Useful defaults in ocr-document-processor — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • S
    Sophia KhanNov 15, 2024

    We added ocr-document-processor from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 61

1 / 7

Discussion

Comments — not star reviews
  • No comments yet — start the thread.