pdf

Extract, merge, split, create, and fill PDF documents using Python libraries and command-line tools.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill pdf-prabaljainn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/prabaljainn/my-claude-code-setup/tree/main/claude/skills/pdf
Command: npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill pdf-prabaljainn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve? Working with PDF files programmatically is fragmented across many libraries and tools, making tasks like text extraction, merging, form filling, and OCR error-prone and time-consuming without clear guidance. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, and watermark PDFs using pypdf, qpdf, and pdftk. - Content Extraction: Extract text, tables, metadata, and embedded images with pdfplumber, pdftotext, and pdfimages, plus OCR support for scanned documents via pytesseract. - PDF Creation & Form Filling: Generate new PDFs with reportlab and fill both fillable and non-fillable PDF forms using dedicated scripts with bounding-box validation. - Use Case: Given a stack of scanned vendor invoices, convert them to images, run OCR to extract text, and compile the results into a searchable document. ## Quick Start Ask the assistant to merge two PDF files into one, or to extract all tables from a specific PDF into a spreadsheet.

Frequently Asked Questions about pdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract tables from a PDF in Python?▼

Use pdfplumber's page.extract_tables() method to detect and extract tables from each page. The results can be loaded into pandas DataFrames and exported to Excel or CSV for further analysis.

How do I merge multiple PDFs into one file?▼

Use pypdf's PdfWriter to add pages from each source PDF and write the combined output, or run qpdf with the --empty --pages flags from the command line. Both approaches preserve page order.

How do I fill a PDF form that has no fillable fields?▼

Extract the form structure with pdfplumber to get label and line coordinates, or estimate positions visually from rendered page images. Then add text annotations at those bounding boxes using the fill_pdf_form_with_annotations.py script.

Can I extract text from a scanned PDF?▼

Scanned PDFs contain images rather than text, so standard extraction fails. Convert pages to images with pdf2image, then run pytesseract OCR on each image to produce searchable text.

Why do subscript characters render as black boxes in reportlab PDFs?▼

ReportLab's built-in fonts lack Unicode subscript and superscript glyphs, so those characters render as solid boxes. Use the <sub> and <super> XML tags inside Paragraph objects instead.

How do I remove a password from an encrypted PDF?▼

Run qpdf with the --password and --decrypt flags to produce a decrypted copy, or call reader.decrypt() in pypdf before reading pages. You must know the existing password.