pdf

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

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill pdf-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/Chia1104/agent-air/tree/main/skills/claude/synced/b066812a-c7a5-4354-b574-f3c218098a45_0fdbac1f-d2db-4307-8341-b45c4d0d68f9/pdf
Command: npx skills add https://github.com/Chia1104/agent-air --skill pdf-chia1104

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, Pillow, pytesseract, reportlab, 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, and tasks like filling forms, extracting tables, or handling scanned documents each require different approaches. This Skill consolidates PDF processing operations into one guide with ready-to-use scripts and code patterns. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, and watermark PDFs using pypdf, qpdf, and pdftk. - Data Extraction: Extract text, tables, metadata, and embedded images with pdfplumber, pdftotext, and pdfimages, plus OCR support for scanned documents via pytesseract. - Form Filling: Fill both fillable PDF forms (via field extraction and validation scripts) and non-fillable forms (via coordinate-based text annotations with bounding box validation). - PDF Creation: Generate new PDFs with reportlab, including styled tables and proper subscript/superscript handling. - Use Case: You receive a non-fillable government form as a PDF. The Skill extracts the form structure, determines precise field coordinates, validates bounding boxes, and produces a completed PDF with correctly positioned text. ## Quick Start Use the pdf skill to merge the three attached quarterly report PDFs into a single document.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I fill a PDF form programmatically in Python?▼

First check if the PDF has fillable fields using pypdf's get_fields method. For fillable forms, extract field info to JSON, assign values, and write with PdfWriter. For non-fillable forms, add FreeText annotations at computed coordinates.

How to extract tables from PDF files?▼

Use pdfplumber's extract_tables method, which detects cell boundaries from lines and text positions. Results can be converted to pandas DataFrames and exported to Excel. Custom table settings help with complex layouts.

What is the difference between pypdf and pdfplumber?▼

pypdf handles structural operations like merging, splitting, rotating, encryption, and form field updates. pdfplumber specializes in content extraction with precise coordinates, making it better for text layout analysis and table extraction.

Can I extract text from a scanned PDF?▼

Scanned PDFs contain images without a text layer, so standard parsers return nothing. Convert pages to images with pdf2image, then run pytesseract OCR on each image to recover searchable text.

Why do Unicode subscripts render as black boxes in reportlab PDFs?▼

ReportLab's built-in fonts lack glyphs for Unicode subscript and superscript characters. Use the <sub> and <super> XML markup tags inside Paragraph objects instead of Unicode characters.

How do I fix mispositioned text when filling non-fillable PDF forms?▼

Verify your coordinate system matches the fields.json declaration: use pdf_width/pdf_height for PDF coordinates or image_width/image_height for pixel coordinates. Run the bounding box validation script to catch intersecting or undersized entry boxes before filling.