extract-pdf-text

Extract text from PDF files via pdfplumber with optional page selection.

Updated Jan 10, 2025
One-click install
npx skills add https://github.com/hairihou/dotfiles --skill extract-pdf-text
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: extract-pdf-text
Source: https://github.com/hairihou/dotfiles/tree/main/src/.claude/skills/extract-pdf-text
Command: npx skills add https://github.com/hairihou/dotfiles --skill extract-pdf-text

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automates extraction of text from PDF documents, enabling quick content reuse and searchability.

Core Features & Use Cases

  • Page-wise or full-document extraction with a simple CLI.
  • Zero-friction dependency handling via inline metadata.
  • Batch processing from multiple PDFs.

Quick Start

Run ./scripts/extract.py my-document.pdf to extract all text, or ./scripts/extract.py my-document.pdf --page 0 to extract a specific page.

Frequently Asked Questions about extract-pdf-text

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

FAQPage Schema
How do I extract text from a PDF file?▼

Extract text from PDF files using this Skill by running it with your PDF path. It uses pdfplumber to read pages and output extracted text to stdout, supporting both full-document and page-specific extraction for downstream processing.

Can I extract text from a specific page in a PDF?▼

Yes, extract text from a specific page by passing a 0-indexed page parameter. This enables page-wise extraction alongside full-document retrieval, allowing targeted content reuse without processing entire files.

What file formats does PDF text extraction work with?▼

PDF text extraction works with multi-page and single-page PDF files. The Skill accepts a PDF path and uses pdfplumber to handle standard PDF formats, returning extracted content for immediate reuse or batch processing.

How do I batch process multiple PDFs to extract text?▼

Batch process multiple PDFs by running the extraction command across files sequentially or in parallel. The Skill returns a non-zero exit code on error, enabling reliable automation and error handling for bulk text extraction workflows.

What happens if PDF text extraction fails?▼

On extraction failure, the Skill returns a non-zero exit code, allowing error handling and retry logic in automation workflows. This behavior ensures batch operations can detect and log failures without silent data loss.