pypdf

Manipulate PDF documents programmatically. Merge, split, rotate, and watermark PDFs. Extract text and metadata. Handle form filling and encryption/decryption.

5 stars

Best use case

pypdf is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manipulate PDF documents programmatically. Merge, split, rotate, and watermark PDFs. Extract text and metadata. Handle form filling and encryption/decryption.

Teams using pypdf should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/pypdf/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/data/office/pypdf/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/pypdf/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How pypdf Compares

Feature / AgentpypdfStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manipulate PDF documents programmatically. Merge, split, rotate, and watermark PDFs. Extract text and metadata. Handle form filling and encryption/decryption.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Pypdf

## Overview

PyPDF is a pure-Python library for working with PDF files. This skill covers comprehensive patterns for PDF manipulation including:

- **PDF merging** - Combine multiple PDFs into one document
- **PDF splitting** - Extract specific pages or split into multiple files
- **Page rotation** - Rotate pages by 90, 180, or 270 degrees
- **Watermarking** - Add text or image watermarks to pages
- **Text extraction** - Extract text content from PDF pages
- **Metadata handling** - Read and modify PDF metadata
- **Form filling** - Fill PDF form fields programmatically
- **Encryption/Decryption** - Secure PDFs with passwords

## When to Use This Skill

### USE when:

- Merging multiple PDF files into a single document
- Splitting large PDFs into smaller files
- Extracting specific pages from PDFs
- Adding watermarks or stamps to documents
- Extracting text content for analysis
- Reading or modifying PDF metadata
- Filling PDF forms programmatically
- Encrypting or decrypting PDF files
- Adding page numbers or headers/footers
- Rotating or reordering pages
- Automating PDF workflows in pipelines
### DON'T USE when:

- Creating PDFs from scratch (use reportlab or weasyprint)
- Need advanced text layout control (use reportlab)
- Converting other formats to PDF (use dedicated converters)
- Need OCR for scanned documents (use pytesseract + pdf2image)
- Working with complex form creation (use reportlab)
- Need to edit existing text content (limited support)

## Prerequisites

### Installation

```bash
# Basic installation
pip install pypdf

# Using uv (recommended)
uv pip install pypdf

# With crypto support for encryption
pip install pypdf[crypto]


*See sub-skills for full details.*
### Verify Installation

```python
from pypdf import PdfReader, PdfWriter, PdfMerger
from pypdf.errors import PdfReadError

print("pypdf installed successfully!")
print(f"Version: {pypdf.__version__}")
```

## Version History

### 1.0.0 (2026-01-17)

- Initial skill creation
- Core capabilities documentation
- 6 complete code examples
- Batch processing patterns
- Encryption and form handling

## Resources

- **Official Documentation**: https://pypdf.readthedocs.io/
- **GitHub Repository**: https://github.com/py-pdf/pypdf
- **PyPI Package**: https://pypi.org/project/pypdf/
- **Migration from PyPDF2**: https://pypdf.readthedocs.io/en/latest/migration.html

## Related Skills

- **reportlab** - PDF creation from scratch
- **python-docx** - Word document handling
- **pillow** - Image processing for PDF images
- **pdf2image** - Convert PDF pages to images

---

*This skill provides comprehensive patterns for PDF manipulation refined from production document processing systems.*

## Sub-Skills

- [1. PDF Merging](1-pdf-merging/SKILL.md)
- [2. PDF Splitting](2-pdf-splitting/SKILL.md)
- [3. Page Rotation and Transformation](3-page-rotation-and-transformation/SKILL.md)
- [4. Watermarking and Stamping](4-watermarking-and-stamping/SKILL.md)
- [5. Text Extraction and Metadata](5-text-extraction-and-metadata/SKILL.md)
- [6. Encryption and Form Filling](6-encryption-and-form-filling/SKILL.md)
- [Batch PDF Processing Pipeline](batch-pdf-processing-pipeline/SKILL.md)
- [1. Memory Management (+2)](1-memory-management/SKILL.md)
- [Common Issues](common-issues/SKILL.md)

Related Skills

python-pptx

5
from vamseeachanta/workspace-hub

Create and manipulate PowerPoint presentations programmatically. Build slide decks with layouts, shapes, charts, tables, and images. Generate data-driven presentations from templates.

python-docx

5
from vamseeachanta/workspace-hub

Create and manipulate Microsoft Word documents programmatically. Build reports, contracts, and documentation with full control over paragraphs, tables, headers, styles, and images.

openpyxl

5
from vamseeachanta/workspace-hub

Create and manipulate Microsoft Excel workbooks programmatically. Build spreadsheets with formulas, charts, conditional formatting, and pivot tables. Handle large datasets efficiently with streaming mode.

pypdf-batch-pdf-processing-pipeline

5
from vamseeachanta/workspace-hub

Sub-skill of pypdf: Batch PDF Processing Pipeline.

pypdf-6-encryption-and-form-filling

5
from vamseeachanta/workspace-hub

Sub-skill of pypdf: 6. Encryption and Form Filling.

pypdf-5-text-extraction-and-metadata

5
from vamseeachanta/workspace-hub

Sub-skill of pypdf: 5. Text Extraction and Metadata.

pypdf-4-watermarking-and-stamping

5
from vamseeachanta/workspace-hub

Sub-skill of pypdf: 4. Watermarking and Stamping.

pypdf-3-page-rotation-and-transformation

5
from vamseeachanta/workspace-hub

Sub-skill of pypdf: 3. Page Rotation and Transformation.

pypdf-2-pdf-splitting

5
from vamseeachanta/workspace-hub

Sub-skill of pypdf: 2. PDF Splitting.

pypdf-1-pdf-merging

5
from vamseeachanta/workspace-hub

Sub-skill of pypdf: 1. PDF Merging.

pdf-pypdf-core-pdf-operations

5
from vamseeachanta/workspace-hub

Sub-skill of pdf: pypdf - Core PDF Operations (+2).

test-oversized-skill

5
from vamseeachanta/workspace-hub

A test fixture skill that exceeds 200 lines with multiple H2/H3 sections for split testing.