| 1 |
--- |
| 2 |
name: pdf |
| 3 |
description: Read, extract, split, merge, rotate, watermark, fill, OCR, or create PDF files with verification of page counts and text extraction. |
| 4 |
--- |
| 5 |
|
| 6 |
# PDF |
| 7 |
|
| 8 |
Use this skill for any task where a PDF is the primary input or output. |
| 9 |
|
| 10 |
## Workflow |
| 11 |
|
| 12 |
1. Identify the PDF operation: read, extract, OCR, split, merge, rotate, |
| 13 |
watermark, redact, fill forms, encrypt/decrypt, or create. |
| 14 |
2. Preserve originals. Write outputs with explicit names. |
| 15 |
3. Use the most reliable available tool: |
| 16 |
- the built-in `File` tool (`action: "read"`) for basic text extraction from PDFs |
| 17 |
- `pdftotext`, `pdfinfo`, `qpdf`, or `mutool` when installed |
| 18 |
- Python libraries such as `pypdf`, `pdfplumber`, `PyMuPDF`, or |
| 19 |
`reportlab` when available |
| 20 |
- OCR tools only for scanned pages |
| 21 |
4. For extraction, report page coverage and note when layout, tables, or OCR |
| 22 |
quality may affect accuracy. |
| 23 |
5. For generated or modified PDFs, verify page count, text extraction where |
| 24 |
possible, and file size. For redaction, confirm removed text is not |
| 25 |
extractable from the output. |
| 26 |
|
| 27 |
Ask before installing dependencies or running OCR over large documents. Do not |
| 28 |
represent a visually scanned PDF as fully accurate text unless OCR quality has |
| 29 |
been checked. |
| 30 |
|