pdf

Extract text, tables, and form data from PDFs using Python libraries.

Updated Oct 20, 2025
One-click install
npx skills add https://github.com/keokukzh/AIAPP-Finisher --skill pdf-keokukzh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/keokukzh/AIAPP-Finisher/tree/main/.claude/skills/pdf-anthropic
Command: npx skills add https://github.com/keokukzh/AIAPP-Finisher --skill pdf-keokukzh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the tedious manual work of filling out PDF forms and extracting data from documents, saving you hours of repetitive effort and reducing human error. It provides a comprehensive toolkit for programmatic PDF management.

Core Features & Use Cases

  • Automated Form Filling: Programmatically fill both fillable and non-fillable PDF forms with precision, including text fields, checkboxes, and radio buttons.
  • Advanced Data Extraction: Pull text, structured tables, and even images from any PDF, including scanned documents (via OCR), into usable formats like JSON or Excel.
  • Document Manipulation: Merge, split, rotate, watermark, and password-protect PDFs at scale, streamlining document workflows.
  • Use Case: Automatically process a batch of 1,000 vendor invoices, extract key financial data (invoice number, date, total) into a spreadsheet, and then merge them into a single, searchable archive for compliance.

Quick Start

Example: Extracting text from a PDF

import pdfplumber

with pdfplumber.open("my_document.pdf") as pdf: first_page = pdf.pages[0] print(first_page.extract_text())

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 PDF documents programmatically?

Extract text and structured tables from PDFs using libraries like pdfplumber, which parse page content into usable formats. For scanned PDFs, apply OCR via pytesseract to convert images to searchable text, then export results to JSON or Excel for downstream processing.

Can I automatically fill out PDF forms with data?

Yes, automate form filling for both fillable and non-fillable PDFs by programmatically writing to text fields, checkboxes, and radio buttons using pypdf and reportlab. Define field locations via JSON schemas and bounding-box extraction to ensure precise, scalable placement across batches.

What's the best way to merge, split, and rotate PDF pages at scale?

Merge, split, and rotate PDF pages using pypdf and qpdf for batch document workflows. Combine these operations with watermarking and password protection via reportlab and pdftk to streamline compliance archiving and secure document distribution.

How do I handle scanned PDFs that contain no selectable text?

Convert scanned PDF images to searchable text using OCR tools like pytesseract integrated with pdf2image. Extract and structure the recognized text into JSON or CSV formats, enabling data extraction workflows on documents that lack native text layers.

Can I process large batches of PDFs and validate output automatically?

Process and validate large PDF batches using Python scripts that orchestrate pypdf, pdfplumber, and pytesseract operations. Build validation utilities to ensure correct field placement, non-overlapping annotations, and data accuracy before export or archival.

Do I need command-line tools or can I work entirely in Python?

Work entirely in Python using pypdf, pdfplumber, reportlab, and pytesseract libraries, or invoke CLI tools like pdftotext, qpdf, and pdftk from Python scripts for specific tasks. Mix approaches based on performance and feature requirements.