pdf

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

11|Updated Apr 4, 2025
One-click install
npx skills add https://github.com/sanand0/scripts --skill pdf-sanand0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/sanand0/scripts/tree/main/agents/pdf
Command: npx skills add https://github.com/sanand0/scripts --skill pdf-sanand0

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pdfplumber>=0.11, pypdf>=5, reportlab>=4.

What problem does it solve?

This Skill automates common PDF workflows: reading content, extracting text and tables, validating and transforming PDFs, and generating new PDFs, reducing manual, error-prone tasks.

Core Features & Use Cases

  • Read PDFs as images for quick visual inspection using CLI tools like pdftoppm and pdfcpu/qpdf
  • Extract text and tables with Python libraries (pdfplumber, pypdf, etc.)
  • Manipulate PDFs with pdfcpu/qpdf (merge, trim, rotate, resize, stamp, watermark)
  • Python automation to generate new PDFs, extract data to CSV, and apply watermarks for document processing.

Quick Start

Extract the first table from input.pdf and save it to table.csv.

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 a PDF file?

Extract text and tables from PDFs using pdfplumber or pypdf libraries, which parse document structure and return content as strings or structured data. Both libraries handle layout-aware extraction, enabling accurate recovery of text order and table cells for further processing or export.

Can I batch process multiple PDF files to extract data?

Yes, batch processing is supported through Python automation with pdfplumber and pypdf. Loop over PDF files, extract text or tables from each, and export results to CSV or other formats, reducing manual extraction work across large document sets.

What's the best way to merge, rotate, or watermark PDFs?

Use pdfcpu or qpdf CLI tools to merge, rotate, resize, and trim PDFs, or use pypdf and ReportLab for programmatic manipulation. Choose CLI tools for one-off operations or Python libraries for integrated workflows combining extraction, transformation, and watermarking.

How do I generate new PDFs programmatically?

Generate PDFs with ReportLab, a Python library for creating documents from scratch with text, tables, and styling. Combine it with extracted data to automate report generation or stamp and watermark existing PDFs for document processing workflows.

Can I convert PDF pages to images for visual inspection?

Convert PDF pages to images using pdftoppm or pdfcpu CLI tools, enabling quick visual inspection without parsing document structure. This approach suits validation, thumbnail generation, or archival workflows where pixel-level rendering is needed.

Does this work with form fields or structured PDF documents?

Yes, pypdf and pdfplumber support form field handling and structured document processing. Extract and manipulate form data programmatically, and use pdfcpu for stamping or watermarking forms as part of automated document workflows.