converter-pdf

Convert judicial PDFs to cleaned TXT via OCR or pdfplumber.

12|7|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/georgemarmelstein/sistema-marmelstein --skill converter-pdf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: converter-pdf
Source: https://github.com/georgemarmelstein/sistema-marmelstein/tree/main/.claude/skills/converter-pdf
Command: npx skills add https://github.com/georgemarmelstein/sistema-marmelstein --skill converter-pdf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pdfplumber, pdf2image, pytesseract, PyPDF2, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill converts judicial PDF documents into TXT using OCR for scanned files, removing typical PJe noise so the extracted text becomes usable for downstream analysis.

Core Features & Use Cases

  • OCR-based conversion (default): Uses OCR (Tesseract) for scanned judicial PDFs to produce page-preserving, cleaned TXT output.
  • Digital extraction mode: Supports a faster path for native digital PDFs using pdfplumber, with fallback to OCR when needed.
  • PJe-specific text cleaning & metrics: Removes recurring headers/footers and PJe pollution patterns, and reports quality stats such as pages, character counts, and reduction percentage.

Quick Start

Ask the Skill to convert a judicial PDF into TXT by running the existing script in OCR mode and saving the results to your chosen output directory.

Frequently Asked Questions about converter-pdf

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

FAQPage Schema
How do I convert scanned judicial PDFs to text?

To convert scanned judicial PDFs to text, this Skill uses Tesseract OCR to extract page-preserving, cleaned plain-text output. It processes scanned inputs and removes PJe boilerplate, making the text usable for downstream analysis.

Can I extract text from digital judicial PDFs without OCR?

Yes, digital judicial PDFs can be extracted without OCR using a faster pdfplumber path by passing the --digital flag. If digital extraction fails, the script automatically falls back to Tesseract OCR processing.

Do I need Tesseract installed to extract text from PJe PDFs?

Yes, Tesseract is required for default OCR-based text extraction from scanned PJe PDFs. The script also depends on pdfplumber, pdf2image, and PyPDF2 to parse pages and convert them into cleaned TXT files.

How do I bulk convert PJe process PDFs to TXT for LLM analysis?

Run the Python script with --input and --output arguments to bulk convert PJe process PDFs to TXT. The output preserves page structure markers, filters PJe-specific headers and footers, and produces LLM-ready text with extraction metrics.

What boilerplate does the PJe cleaning remove from extracted PDF text?

PJe cleaning removes recurring headers, footers, and PJe-specific pollution patterns from the extracted text. It also reports quality statistics such as page counts, character counts, and the percentage of noise reduction achieved.