← marketplacepdf
generaltoolOfficialsha:bfd6fbb8b8c51160manual
Use when a task involves a PDF file — extracting text or tables, merging or splitting, rotating, watermarking, filling forms, encrypting, OCR, or creating one — so the agent picks the right library or CLI tool.
Install confidence
curl --create-dirs -fsSL https://skillmake.xyz/i/pdf -o ~/.claude/skills/pdf/SKILL.md
Pinned content
sha:bfd6fbb8b8c51160
Generated with
manual
Source
github.com
The file served at /api/marketplace/pdf-bfd6fbb8/raw matches this hash. Inspect before install, then copy the command.
3,255 chars · ~814 tokens
--- name: pdf description: Use when a task involves a PDF file — extracting text or tables, merging or splitting, rotating, watermarking, filling forms, encrypting, OCR, or creating one — so the agent picks the right library or CLI tool. source: https://github.com/anthropics/skills/tree/main/skills/pdf generated: 2026-07-02T18:42:59.795Z category: tool audience: general --- ## When to use - Extracting text or tables from a PDF, including scanned pages that need OCR - Merging, splitting, rotating, or watermarking pages across PDF files - Creating a new PDF from scratch or filling out a PDF form - Encrypting, decrypting, or extracting embedded images from a PDF ## Key concepts ### pypdf for structural edits The go-to Python library for merging, splitting, rotating, watermarking, and encrypting — you copy pages between a PdfReader and PdfWriter and write the result out. ### pdfplumber for extraction Used to pull text with layout and to extract tables (page.extract_tables), which can be loaded into pandas DataFrames and exported to Excel. ### reportlab for creation Builds new PDFs either with a low-level Canvas or the higher-level Platypus flow (SimpleDocTemplate, Paragraph, Spacer, PageBreak) for multi-page documents. ### OCR for scanned PDFs Scanned documents are converted to images with pdf2image, then run through pytesseract to make the text searchable/extractable. ### Command-line tools poppler-utils (pdftotext, pdfimages), qpdf, and pdftk handle merge/split/rotate/decrypt from the shell when a Python round-trip isn't warranted. ### Progressive references SKILL.md is the quick start; REFERENCE.md covers advanced pypdfium2 and JavaScript (pdf-lib) usage, and FORMS.md must be read before filling any PDF form. ## API reference ``` npx skills add anthropics/skills --skill pdf ``` Install the PDF processing skill. ``` npx skills add anthropics/skills --skill pdf ``` ``` PdfReader / PdfWriter (pypdf) ``` Read pages and assemble output for merge, split, rotate, watermark, and encrypt operations. ``` from pypdf import PdfReader, PdfWriter writer = PdfWriter() for f in ["doc1.pdf", "doc2.pdf"]: for page in PdfReader(f).pages: writer.add_page(page) with open("merged.pdf", "wb") as out: writer.write(out) ``` ``` qpdf --empty --pages ... -- out.pdf ``` Merge, split, rotate, or decrypt PDFs from the command line. ``` qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf qpdf --password=pw --decrypt encrypted.pdf decrypted.pdf ``` ## Gotchas - Never use Unicode subscript/superscript glyphs in reportlab — the built-in fonts lack them and they render as black boxes; use <sub>/<super> tags in Paragraphs instead - Filling a PDF form requires reading FORMS.md first; don't wing it with generic page edits - Scanned PDFs have no extractable text layer — you must OCR via pdf2image + pytesseract before extraction works - Table extraction quality depends on pdfplumber over pypdf; pypdf's extract_text loses tabular structure - OCR and image conversion need system deps (tesseract, poppler) beyond the pip packages --- Generated by SkillMake from https://github.com/anthropics/skills/tree/main/skills/pdf on 2026-07-02T18:42:59.795Z. Verify against source before relying on details.
File: ~/.claude/skills/pdf/SKILL.md