# PDF

> Read and extract text from .pdf files, page by page. Use when the user uploads or references a PDF to read or summarize.

- Skill: `decocms/pdf` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add decocms/pdf`
- Raw SKILL.md: https://api.skillmd.com/api/skills/decocms/pdf/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: decocms (https://skillmd.com/u/decocms)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/decocms/pdf

---


# pdf — PDF documents

Use this skill to read text from `.pdf` files.

## Scripts

### extract.py

Print text content from a `.pdf`, page by page.

```
python org/public/core/pdf/extract.py <path-to-file.pdf>
```

Output is plain text with `--- page N ---` separators. PDFs that are pure
scans (image-only, no embedded text layer) will produce empty pages — OCR is
not performed.

## Direct pypdf usage

For metadata, structure, splitting, merging, or filling forms, import `pypdf`
directly. The library is preinstalled.

```python
from pypdf import PdfReader
reader = PdfReader("/path/to/file.pdf")
for page in reader.pages:
    text = page.extract_text()
```

