pdf

Extract text and tables from PDFs into structured data formats.

1|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/HanLi0705/lead_agent --skill pdf-hanli0705
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/HanLi0705/lead_agent/tree/main/Mini-Agent-main/mini_agent/skills/document-skills/pdf
Command: npx skills add https://github.com/HanLi0705/lead_agent --skill pdf-hanli0705

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the time-consuming manual work of processing PDFs by enabling automated text extraction, table capture, form handling, and document manipulation across multiple files.

Core Features & Use Cases

  • Extract text and tables from PDFs into structured data formats for downstream processing.
  • Fill both fillable and non-fillable PDF forms programmatically and annotate documents for verification.
  • Use Case: Process hundreds of invoices to extract key fields (date, total, invoice number) and store them in a CSV or database.

Quick Start

Run from the skill root with the bundled Python scripts to perform common tasks:

  • Build field metadata: python scripts/extract_form_field_info.py input.pdf fields.json
  • Inspect PDFs by rendering pages to images: python scripts/convert_pdf_to_images.py input.pdf ./images
  • Fill a form or annotate: python scripts/fill_fillable_fields.py input.pdf fields.json output.pdf

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 PDFs into structured data formats?

To extract text and tables from PDFs into structured data, this skill uses Python scripts with pypdf to read and parse document content. It processes invoices and reports, capturing key fields for downstream processing into structured formats like CSV or databases.

Can I fill both fillable and non-fillable PDF forms programmatically?

Yes, you can fill both fillable and non-fillable PDF forms programmatically. The skill provides scripts to build field metadata from an input PDF and apply that data to fill forms or annotate documents for verification using Python libraries.

How do I render PDF pages to images for inspection using Python?

To render PDF pages to images for inspection, run the bundled script convert_pdf_to_images.py. This skill uses the pdf2image and Pillow libraries to convert PDF documents into image files, enabling visual verification and document inspection workflows.

Does this approach work for batch processing hundreds of PDF invoices?

Yes, this approach works for batch processing hundreds of PDF invoices. The skill automates PDF processing workflows where multiple files must be parsed, extracting key fields like invoice number and total into structured data formats for storage.

What Python libraries are needed for PDF text extraction and document manipulation?

The Python libraries needed for PDF text extraction and document manipulation are pypdf, pdf2image, and Pillow. These dependencies allow the skill to read, render, and annotate PDFs, supporting form handling and document transformation tasks.