pdf

Extract text and tables from PDFs using Python libraries and CLI tools.

167k|19.9k|Updated Sep 22, 2025
One-click install
npx skills add https://github.com/anthropics/skills --skill pdf-anthropics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/anthropics/skills/tree/main/skills/pdf
Command: npx skills add https://github.com/anthropics/skills --skill pdf-anthropics

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the tedious, repetitive work of manually filling out PDF forms, extracting data, and manipulating documents at scale.

Core Features & Use Cases

  • Form Automation: Fill both fillable and non-fillable PDF forms with precision.
  • Data Extraction: Pull text, tables, and structured data from any PDF format.
  • Document Manipulation: Merge, split, rotate, and create PDFs programmatically.
  • Use Case: Imagine you have 50 employee onboarding forms to process. Use this Skill to automatically fill in names, dates, and department information across all documents simultaneously.

Quick Start

Use the pdf skill to extract all text and tables from the attached file 'financial_report.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 PDF files programmatically?

Text and table extraction from PDFs uses libraries like pdfplumber and pypdf to parse document structure and pull formatted data. pdfplumber excels at table detection, while pypdf handles general text extraction across pages, with OCR fallback via pytesseract for scanned documents.

Can I automate filling out PDF forms at scale?

Yes. Use pypdf or pdftk to programmatically fill fillable form fields with data, then batch process multiple documents. For non-fillable forms, reportlab lets you generate new PDFs with text positioned exactly where form fields appear.

What's the best way to merge, split, or rotate PDF pages?

pypdf and qpdf handle page manipulation—merging multiple PDFs, extracting specific page ranges, and rotating content—all without re-encoding. These operations preserve quality and metadata while enabling bulk document restructuring.

How do I handle scanned PDFs or images embedded in PDF files?

Scanned PDFs require OCR processing. pytesseract converts image-based PDFs to extractable text, while pdf2image renders PDFs as images for preprocessing before OCR. pypdfium2 provides additional rendering capabilities for complex documents.

Can I create PDFs programmatically or add annotations to existing files?

reportlab generates PDFs from scratch with text, images, and structured layouts. pypdf and pdftk add annotations, stamps, and metadata to existing PDFs, enabling dynamic document creation and enhancement workflows.

Do I need specialized knowledge to process PDFs in batch operations?

No. The pypdf, pdfplumber, and reportlab libraries handle common batch workflows—extraction, form-filling, merging—through straightforward Python APIs, reducing manual processing from hours to minutes across hundreds of documents.

Related Skills