---
name: PDF Processing
slug: pdf-processing-8
category: Data
description: PDF Processing extracts text and tables, fills forms, merges and splits files, batch-processes PDFs, converts pages to images, and generates PDFs programmatically. Use it when working with .pdf files, not Word docs, spreadsheets, or presentations.
github: "https://github.com/telagod/code-abyss/tree/main/skills/processing-pdfs"
language: JavaScript
stars: 239
forks: 32
install: "npx degit https://github.com/telagod/code-abyss/tree/main/skills/processing-pdfs ~/.claude/skills/processing-pdfs"
installs_to: ~/.claude/skills/processing-pdfs
source_path: skills/processing-pdfs/SKILL.md
collection_size: 25
category_size: 710
collection_url: "https://dirskills.com/collections/telagod/code-abyss"
added: 2026-09-03T06:03:50.589Z
last_synced: 2026-09-03T06:03:50.589Z
canonical_url: "https://dirskills.com/skills/pdf-processing-8"
---

# PDF Processing

PDF Processing extracts text and tables, fills forms, merges and splits files, batch-processes PDFs, converts pages to images, and generates PDFs programmatically. Use it when working with .pdf files, not Word docs, spreadsheets, or presentations.

**Install:**

```bash
npx degit https://github.com/telagod/code-abyss/tree/main/skills/processing-pdfs ~/.claude/skills/processing-pdfs
```

## README

# PDF Processing

Essential PDF operations using Python libraries and CLI tools.

## Decision Matrix

| Task | Best Tool | Reference |
|------|-----------|-----------|
| Merge / split / metadata / rotate | pypdf | [recipes.md](references/recipes.md) |
| Extract text (layout preserved) | pdfplumber | [recipes.md](references/recipes.md) |
| Extract tables | pdfplumber | [recipes.md](references/recipes.md) |
| Create new PDF | reportlab | [recipes.md](references/recipes.md) |
| Batch CLI ops | qpdf / pdftk | [recipes.md](references/recipes.md) |
| OCR scanned PDFs | pytesseract + pdf2image | [advanced.md](references/advanced.md) |
| Add watermark / extract images / encrypt | pypdf / pdfimages | [advanced.md](references/advanced.md) |
| Fill PDF forms | pdf-lib / pypdf | [FORMS.md](FORMS.md) |
| Advanced pypdfium2 / pdf-lib JS | — | [REFERENCE.md](REFERENCE.md) |

## Quick Start

```python
from pypdf import PdfReader
reader = PdfReader("document.pdf")
print(f"Pages: {len(reader.pages)}")
text = "".join(page.extract_text() for page in reader.pages)
```

## Workflow

1. **Identify task** — text extraction? table? creation? form? Pick row from matrix above.
2. **Load reference** — recipes.md covers 90% of tasks; advanced.md for OCR / encrypt; FORMS.md for forms.
3. **Implement** — copy-adapt recipe; verify output.
4. **Validate** — open in a viewer or grep extracted text.

## Library Selection

| Library | Use for |
|---------|---------|
| pypdf | Merge, split, metadata, encryption, rotation |
| pdfplumber | Text extraction with layout, tables |
| reportlab | Generate PDFs programmatically |
| pdf2image + pytesseract | OCR scanned documents |
| qpdf / pdftk (CLI) | Batch ops, no Python needed |
