Skip to content
Skills Library
Documents & office · Conversion & formats

pdf-extract

/pdf-extract

Fast, zero-AI text extraction from PDFs that have a text layer (digitally created PDFs from Word, Typst, WeasyPrint, wkhtmltopdf, LaTeX, etc). Uses pymupdf - instant and deterministic. Use when you need to quickly pull raw text from a known text-layer PDF, e.g. "extract text from this PDF", "read this PDF", "get the content of", "what does this PDF say", "quickly read this PDF". Do NOT use for scanned or image-only PDFs, or when this returns blank text - use ocr; for headings, tables, layout blocks or AI analysis of complex layouts - use document-parse; for forms, merging, splitting or table e

Licence
MIT
Last repository change
04.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 04.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Fast, zero-AI text extraction from PDFs that have a text layer (digitally created PDFs from Word, Typst, WeasyPrint, wkhtmltopdf, LaTeX, etc). Uses pymupdf - instant and deterministic. Use when you need to quickly pull raw text from a known text-layer PDF, e.g. "extract text from this PDF", "read this PDF", "get the content of", "what does this PDF say", "quickly read this PDF". Do NOT use for scanned or image-only PDFs, or when this returns blank text - use ocr; for headings, tables, layout blocks or AI analysis of complex layouts - use document-parse; for forms, merging, splitting or table e

Triggers from the description

extract text from this PDFread this PDFget the content ofwhat does this PDF sayquickly read this PDF
Original author description

Fast, zero-AI text extraction from PDFs that have a text layer (digitally created PDFs from Word, Typst, WeasyPrint, wkhtmltopdf, LaTeX, etc). Uses pymupdf - instant and deterministic. Use when you need to quickly pull raw text from a known text-layer PDF, e.g. "extract text from this PDF", "read this PDF", "get the content of", "what does this PDF say", "quickly read this PDF". Do NOT use for scanned or image-only PDFs, or when this returns blank text - use ocr; for headings, tables, layout blocks or AI analysis of complex layouts - use document-parse; for forms, merging, splitting or table e

How it works

  1. Prerequisites
  2. Extract text from a single PDF
  3. Extract and save to file
  4. Extract specific pages
  5. Batch extract from multiple PDFs
  6. Get PDF metadata
  7. Key notes
  8. When another skill fits better
Original SKILL.md headings · 107 lines, 353 words
SKILL.md preview
---
name: pdf-extract
description: Fast, zero-AI text extraction from PDFs that have a text layer (digitally created PDFs from Word, Typst, WeasyPrint, wkhtmltopdf, LaTeX, etc). Uses pymupdf - instant and deterministic. Use when you need to quickly pull raw text from a known text-layer PDF, e.g. "extract text from this PDF", "read this PDF", "get the content of", "what does this PDF say", "quickly read this PDF". Do NOT use for scanned or image-only PDFs, or when this returns blank text - use ocr; for headings, tables, layout blocks or AI analysis of complex layouts - use document-parse; for forms, merging, splitting or table export to CSV/Excel - use pdf-processing-pro.
allowed-tools: Bash, Read, Write
---

# PDF Text Extraction

Extract text from PDF files using pymupdf via `uv run --with pymupdf`.

## Prerequisites

- `uv` installed - see <https://docs.astral.sh/uv/getting-started/installation/>
- No venv or pre-installation needed - `uv run --with` handles caching automatically

## Extract text from a single PDF

```bash
uv run --with pymupdf python3 -c "
import pymupdf
doc = pymupdf.open('/path/to/file.pdf')
for page in doc:
    text = page.get_text().strip()
    if text:
        print(text)
        print()
"
```

## Extract and save to file

```bash
uv run --with pymupdf python3 -c "
import pymupdf

doc = pymupdf.open('/path/to/file.pdf')
pages = []
for page in doc:
    text = page.get_text().strip()
    if text:
        pages.append(text)

with open('/path/to/output.txt', 'w') as f:
    f.write('\n\n'.join(pages))

print(f'Extracted {len(pages)} pages')
"
```

## Extract specific pages

```bash
uv run --with pymupdf python3 -c "
import pymupdf

doc = pymupdf.open('/path/to/file.pdf')
# Pages are 0-indexed
for i in range(2, 5):  # Pages 3-5
    text = doc[i].get_text().strip()
    if text:
        print(text)
"
```

## Batch extract from multiple PDFs

```bash
uv run --with pymupdf python3 -c "
import pymupdf
import glob
import os

for pdf_path in glob.glob('/path/to/folder/*.pdf'):
    doc = pymupdf.open(pdf_path)
    text = '\n\n'.join(p.get_text().strip() for p in doc if p.get_text().strip())
    out_path = pdf_path.rsplit('.', 1)[0] + '.txt'
    with open(out_path, 'w') as f:
        f.write(text)
    print(f'{os.path.basename(pdf_path)}: {len(doc)} pages extracted')
"
```

## Get PDF metadata

```bash
uv run --with pymupdf python3 -c "
import pymupdf
doc = pymupdf.open('/path/to/file.pdf')
meta = doc.metadata
print(f'Title: {meta.get(\"title\", \"N/A\")}')
print(f'Author: {meta.get(\"author\", \"N/A\")}')
print(f'Pages: {len(doc)}')
print(f'Creator: {meta.get(\"creator\", \"N/A\")}')
"
```

## Key notes

- Import it as `pymupdf`. The old `fitz` alias still works but is deprecated and will be removed.
- Pages are 0-indexed: `doc[0]` is the first page
- `get_text()` returns plain text; use `get_text("blocks")` for positioned blocks
- `get_text("html")` returns HTML with formatting preserved
- The package caches after the first `uv run --with pymupdf` invocation - subsequent runs are instant

## When another skill fits better

| Situation | Skill |
|---|---|
| Output is blank or near-empty - the PDF is a scan | ocr |
| Need headings, tables, reading order or AI reading of charts | document-parse |
| Filling forms, merging, splitting, tables to CSV/Excel | pdf-processing-pro |

Versions

RepositoryScoreLicence
This page · henkisdabro/wookstar-claude-plugins100MIT
aipoch/medical-research-skills100MIT

Database snapshot: 13.11.2026 · package version a53bbffb6a91 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95ocr
    Adds a searchable text layer to scanned or image-only PDFs with OCRmyPDF (Tesseract) - local, free, deterministic, no AI tokens. Use when a PDF has no text layer, when the user says "OCR this", "make this searchable", "extract text from a scan" or "digitise this book", when…
  • 100pdf
    Use when working with PDF files. Covers text and table extraction, merging and splitting, form filling, watermarking, OCR for scanned documents, and generating PDFs. Trigger on "extract the tables from this pdf", "merge these pdfs", "fill out this pdf form", "ocr this scanned…
  • 100tool-pdf-extractor
    Use as the first step whenever a user uploads a PDF document that needs text analysis, review, or RAG indexing. Extracts text from PDFs with a selectable text layer using PDF.js (fast, no OCR), preserving page boundaries, paragraph structure, headings, and tables for downstream…
  • 100pdf-ocr
    Extract text from scanned PDFs using optical character recognition. Use when a user asks to OCR a PDF, read a scanned document, extract text from an image PDF, digitize a scanned file, convert a scanned PDF to text, or read text from a photograph of a document. Supports multiple…
  • 100pdf-processing-pro
    PDF toolkit of uv-runnable scripts for forms, tables, merging, splitting and validation. Use when filling a PDF form from data, reading a form's fields, extracting tables to CSV or Excel, merging or splitting PDFs, checking a PDF is valid, or batch-processing a folder of PDFs…
  • 100skill-119
    Extract text, tables, and images from PDF files using pdfplumber and PyMuPDF. Use when analyzing PDF documents, brand materials, reports, or any content that requires structured extraction from PDF format. Supports table detection, layout preservation, and high-quality image extraction.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.