pdf-analysis

Installation
SKILL.md

PDF Analysis

Step 0 — Detect PDF type (text vs scanned)

Critical first step: determine whether the PDF has extractable text or is a scanned image. Never skip this — using the wrong parser wastes time and produces empty results.

import fitz  # PyMuPDF

def detect_pdf_type(pdf_path, sample_pages=3):
    """
    Returns 'text' if PDF has extractable text, 'scanned' if image-based.
    Checks first N pages (or all if fewer).
    """
    doc = fitz.open(pdf_path)
    total_chars = 0
    pages_checked = min(sample_pages, len(doc))
Installs
2
GitHub Stars
4.9K
First Seen
Jul 3, 2026
pdf-analysis — opensensenova/sensenova-skills