One-click install
npx skills add https://github.com/jdrodriguez/legal-toolkit --skill ocr-jdrodriguez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ocr
Source: https://github.com/jdrodriguez/legal-toolkit/tree/main/legal-toolkit/skills/ocr
Command: npx skills add https://github.com/jdrodriguez/legal-toolkit --skill ocr-jdrodriguez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires paddleocr, paddlepaddle, Pillow, PyMuPDF, pdf2image, pytesseract, docx, and includes scripts (resource) components.

What problem does it solve?

Quickly extract high-quality, machine-readable text from scanned PDFs and images so legal teams can search, summarize, and repurpose archived or scanned documents without manual retyping.

Core Features & Use Cases

  • High-accuracy OCR using PaddleOCR with pytesseract as a fallback for lighter environments.
  • Image preprocessing including deskewing, contrast enhancement, noise reduction, and sharpening to improve extraction on degraded scans and faxes.
  • Batch and single-file modes: process a directory of scanned documents or an individual file and produce per-page confidence scores, text outputs, and a human-readable extraction report.
  • Output options: plain text, structured JSON, searchable PDF layer, and .docx reports for review and case files.

Quick Start

Use the ocr skill to extract text from /path/to/scanned.pdf and save results to an _ocr_output folder.

Frequently Asked Questions about ocr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text from scanned PDF files for legal document digitization?

You can extract text from scanned PDF files using OCR to convert images into machine-readable text. This skill processes legal evidence and filings using PaddleOCR and pytesseract, outputting searchable PDFs and .docx reports for case files.

Can I batch process a directory of scanned images instead of one file at a time?

Yes, you can batch process a directory of scanned images. The skill supports both single-file and directory batch processing for common image formats and scanned PDFs, generating per-page confidence scores and structured JSON outputs.

Does OCR work on low quality scans with skewing or noise?

OCR works on low quality scans by applying image preprocessing techniques like deskewing, contrast enhancement, and noise reduction. These steps improve text extraction accuracy on degraded scans and faxes before running the OCR engine.

What is the best way to make archived legal documents searchable without manual retyping?

The best way to make archived legal documents searchable is using language-aware OCR to extract text and export a searchable PDF layer. This creates machine-readable text from scanned filings, enabling search and summarization without manual retyping.

What formats can I export OCR results to for legal case files?

You can export OCR results to plain text, structured JSON, searchable PDF layers, and .docx formats. These outputs include human-readable extraction reports with confidence scores for review and integration into legal case files.

Do I need poppler-utils or Node.js to process scanned PDFs?

You need PyMuPDF or poppler-utils to process scanned PDFs, while optional Node.js tooling provides additional functionality. The core OCR pipeline relies on PaddleOCR, pytesseract, and Pillow, with a pytesseract fallback for lighter environments.