pdf

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

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/wolfmanstout/agent-skills --skill pdf-wolfmanstout
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/wolfmanstout/agent-skills/tree/main/subtrees/skills/skills/pdf
Command: npx skills add https://github.com/wolfmanstout/agent-skills --skill pdf-wolfmanstout

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, Pillow, pytesseract, reportlab, pypdfium2, 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, form filling, merging, and OCR error-prone and time-consuming without clear guidance. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, watermark, and extract images or metadata from PDFs using pypdf, qpdf, and poppler-utils. - Text and Table Extraction: Pull text with layout and structured tables into pandas DataFrames using pdfplumber, plus OCR support for scanned documents via pytesseract. - PDF Creation and Form Filling: Generate new PDFs with reportlab and fill both fillable and non-fillable PDF forms using dedicated scripts with coordinate 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 Use the pdf skill to merge the three attached PDF reports into a single combined document.

Frequently Asked Questions about pdf

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

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

Use pdfplumber to extract text with layout and tables from PDF pages via page.extract_text() and page.extract_tables(). Extracted tables can be loaded into pandas DataFrames and exported to Excel or CSV.

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

Extract the form structure with pdfplumber to get label and checkbox coordinates, or convert pages to images and estimate positions visually. Then add text annotations at those bounding boxes using pypdf FreeText annotations.

What is the difference between pypdf and pdfplumber?

pypdf handles structural operations like merging, splitting, rotating, encrypting, and form field updates. pdfplumber focuses on content extraction, providing precise character coordinates and table detection within pages.

Can I extract text from a scanned PDF?

Scanned PDFs contain images rather than text layers, so standard parsers return nothing. Convert pages to images with pdf2image, then run OCR with pytesseract to recover the 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 markup tags inside Paragraph objects instead.

How do I merge or split PDFs from the command line?

Use qpdf with the --empty --pages syntax to merge files or select page ranges, and --split-pages to divide a document into chunks. pdftk and pypdf offer equivalent merge and split operations.