pdf

Extract text, tables, and form data from PDF files using Python.

71|10|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/XiaoMaColtAI/BettaFish-skill --skill pdf-xiaomacoltai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/XiaoMaColtAI/BettaFish-skill/tree/main/subskills/pdf
Command: npx skills add https://github.com/XiaoMaColtAI/BettaFish-skill --skill pdf-xiaomacoltai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Eliminate manual, repetitive PDF tasks by providing automated tools to read, extract, transform, and populate PDF content so teams can process documents faster and with fewer errors.

Core Features & Use Cases

  • Text and Table Extraction: Extract searchable text, page-level text, and structured tables from both scanned and native PDFs.
  • Form Filling & Annotation: Fill fillable form fields programmatically or place text annotations into non-fillable forms with coordinate conversion and validation.
  • Page & File Manipulation: Merge, split, rotate, watermark, encrypt/decrypt, and extract images from PDFs for batch workflows.
  • Use Case: Automate invoice ingestion by converting batches of PDF invoices into structured CSV rows, filling standardized forms, and producing finalized reports.

Quick Start

Extract all text and tables from report.pdf and output a consolidated CSV with one row per table.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I extract structured tables and text from scanned PDF files?

Table and text extraction from scanned PDFs uses OCR and pdfplumber to read both native and scanned documents. It processes page-level text and structured tables, outputting consolidated rows for automated ingestion workflows.

Can I programmatically fill fillable PDF form fields and add text annotations?

Yes, programmatic form filling populates fillable PDF form fields and places text annotations into non-fillable forms. It applies coordinate conversion and validation to ensure accurate text placement within the document.

What is the best way to merge, split, and watermark PDF documents in Python?

Merging, splitting, and watermarking PDF documents in Python is handled through pypdf and pdf2image. These libraries manipulate pages and files directly, enabling batch workflows for file manipulation and image extraction.

Does this PDF processing approach work for both born-digital and scanned documents?

Yes, PDF processing applies to both born-digital and scanned documents. It uses pdfplumber for native text extraction and OCR via pdf2image and Pillow for scanned content, ensuring broad document compatibility.

How do I convert batches of PDF invoices into structured CSV rows?

Converting PDF invoices into structured CSV rows requires extracting page-level text and tables using pdfplumber. The extracted data is then consolidated, outputting one row per table for automated invoice ingestion.

Why does text extraction fail on some scanned PDFs without OCR?

Text extraction fails on scanned PDFs because they contain images rather than searchable text. OCR is required to convert the image-based content into readable text, allowing pdfplumber to parse the data successfully.