pdf

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

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/mccleod1290/bb-agentic-setupv2 --skill pdf-mccleod1290
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/mccleod1290/bb-agentic-setupv2/tree/main/documenting-skills/pdf
Command: npx skills add https://github.com/mccleod1290/bb-agentic-setupv2 --skill pdf-mccleod1290

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, each with different APIs for reading, writing, merging, and form filling. This Skill consolidates proven code patterns and scripts so you can complete any PDF task without researching library documentation from scratch. ## Core Features & Use Cases - Read and Extract: Pull text, tables, metadata, and embedded images from PDFs using pypdf, pdfplumber, and poppler-utils, including OCR for scanned documents. - Create and Modify: Merge, split, rotate, watermark, encrypt, and generate new PDFs with reportlab, qpdf, or pdf-lib. - Form Filling: Fill both fillable AcroForm fields and non-fillable forms via a guided workflow with validation scripts that check bounding boxes before writing. - Use Case: Given a stack of scanned intake forms, convert them to images, determine field coordinates, validate the layout, and produce filled PDFs automatically. ## Quick Start Ask the assistant to merge two PDF files, extract the tables from a report, or fill out a specific PDF form using this skill.

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 preserved and to detect tables via page.extract_tables(). For simple text extraction, pypdf's page.extract_text() or the pdftotext command-line tool also work.

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 convert pages to images and estimate positions visually. Then add FreeText annotations at those bounding boxes using pypdf, validating box overlaps first.

What is the difference between pypdf, pdfplumber, and reportlab?▼

pypdf handles merging, splitting, rotating, and form field operations. pdfplumber specializes in text and table extraction with coordinates. reportlab creates new PDFs from scratch with styled paragraphs and tables.

Can I extract text from a scanned PDF?▼

Scanned PDFs contain images, not text layers, so standard extraction returns nothing. Convert pages to images with pdf2image, then run pytesseract OCR on each image 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 tags inside Paragraph objects instead.

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

Use qpdf: merge with 'qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf' and split page ranges with 'qpdf input.pdf --pages . 1-5 -- out.pdf'. pdftk offers similar cat and burst operations.