pdflisted
Install: claude install-skill smith-network-solutions/threadknot
# PDF files
Which tool depends on the verb:
| Task | Tool |
| --- | --- |
| Rearrange pages, merge, split, rotate, encrypt, metadata, forms | **pypdf** (`scripts/pdftool.py`) |
| Extract text, and especially **tables** | **pdfplumber** (`scripts/extract.py`) |
| Make a PDF from HTML/CSS | **WeasyPrint**, or LibreOffice for an Office source |
| Make a PDF programmatically (precise placement) | **reportlab** |
| Look at a page | rasterise — `scripts/extract.py --png` |
Avoid **PyMuPDF/fitz**. It is widely recommended and technically excellent, but
it is AGPL-3.0 or paid-commercial, which quietly infects whatever it touches.
Everything above is MIT or BSD.
## Inspect before you act
scripts/pdftool.py info report.pdf
Page count, per-page size and rotation, metadata, encryption status, whether it
has form fields, and whether the pages carry extractable text or are scanned
images. **The last one decides your whole approach** — no text extractor will
get anything out of a scan, and the answer is OCR, not a different library.
## Extracting text and tables
scripts/extract.py report.pdf # all text
scripts/extract.py report.pdf --pages 1-3 # a range
scripts/extract.py report.pdf --tables # tables as CSV
scripts/extract.py report.pdf --layout # preserve visual columns
`--tables` uses pdfplumber's ruling-line detection, which works well on tables
that have visible borders and poorly on those laid out with white