pdf

Extract text and structured data from PDF documents using pypdf and pdfplumber.

Updated Mar 15, 2025
One-click install
npx skills add https://github.com/mrdonlee/dotfiles --skill pdf-mrdonlee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/mrdonlee/dotfiles/tree/main/.agents/skills/pdf
Command: npx skills add https://github.com/mrdonlee/dotfiles --skill pdf-mrdonlee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, pytesseract, reportlab, pandas, 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.

Core Features & Use Cases

  • Automated Form Filling: Programmatically fill both fillable and non-fillable PDF forms.
  • Data Extraction: Pull text and structured table data from any PDF into usable formats.
  • Use Case: Imagine you have 100 vendor invoices in PDF format. Use this Skill to automatically extract the invoice number, date, and total amount from each one and compile them into a single CSV file.

Quick Start

Use the pdf skill to extract all text from the attached file 'invoice-q3.pdf'.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I extract structured table data from PDF invoices automatically?

You can extract structured table data from PDF invoices automatically by parsing binary PDF streams with pdfplumber. This pulls text and tabular data into usable formats without manual intervention, allowing you to compile invoice numbers and totals into a single CSV file.

Can I use Python to fill non-fillable PDF forms programmatically?

Yes, you can use Python to fill non-fillable PDF forms programmatically. This Skill automates filling both fillable and non-fillable PDF forms, eliminating the tedious manual effort required for document processing and form digitization workflows.

Does pdfplumber support text extraction from scanned PDF documents?

Text extraction from scanned PDF documents requires Optical Character Recognition capabilities using pytesseract and pdf2image. While pdfplumber parses digital text streams, scanned documents need image conversion and OCR to retrieve archival data automatically.

What is the best way to convert PDF data extraction results into a CSV file?

The best way to convert PDF data extraction results into a CSV file is by using pandas to structure the parsed text and tables. This approach compiles extracted invoice details and structured data into a single usable format for administrative workflows.

Why does PDF data extraction fail on certain binary document streams?

PDF data extraction can fail on binary document streams when files contain scanned images instead of embedded text. Parsing libraries like pypdf require digital text layers, meaning image-based documents must first undergo OCR processing to retrieve data successfully.

Do I need Python dependencies installed to automate PDF form filling and data extraction?

Yes, you need Python dependencies installed to automate PDF form filling and data extraction. The workflow specifically requires pypdf and pdfplumber to parse binary PDF streams, alongside pytesseract and pdf2image for handling scanned archival documents.