pdf

Extract, create, merge, split, and fill PDF documents using Python libraries and command-line tools.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill pdf-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/pdf
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill pdf-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with PDF files programmatically is fragmented across many libraries and tools, making it hard to know which approach to use for extracting text, filling forms, merging documents, or generating reports. ## Core Features & Use Cases - Text and Table Extraction: Pull text and structured tables from PDFs using pdfplumber and pypdf, with OCR support for scanned documents via pytesseract. - PDF Creation and Manipulation: Generate new PDFs with reportlab, merge or split documents, rotate pages, add watermarks, and manage encryption. - Form Filling: Fill both fillable AcroForm fields and non-fillable forms using a validated bounding-box annotation workflow with dedicated scripts. - Use Case: Given a stack of non-fillable PDF application forms, convert pages to images, define field bounding boxes, validate them visually, and produce completed PDFs automatically. ## Quick Start Use the pdf skill to extract all tables from the attached report.pdf and save them to an Excel file.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I extract tables from a PDF in Python?

Use pdfplumber's extract_tables() method on each page to detect table structures and return rows as lists. You can convert the results into pandas DataFrames and export them to Excel or CSV for further analysis.

How do I fill a PDF form programmatically?

First run check_fillable_fields.py to detect AcroForm fields. For fillable PDFs, extract field info to JSON and use fill_fillable_fields.py with your values. For non-fillable PDFs, define bounding boxes in fields.json and add text annotations.

Which Python library should I use for PDF tasks?

Use pdfplumber for text and table extraction, pypdf for merging, splitting, rotating, and encryption, and reportlab for creating new PDFs. For rendering pages to images, pypdfium2 or pdf2image work well.

Can I extract text from a scanned PDF?

Scanned PDFs contain images rather than text layers, so standard parsers return nothing. Convert pages to images with pdf2image, then run OCR with pytesseract to recover the text content.

How do I merge or split PDF files from the command line?

Use qpdf with the --empty --pages syntax to merge multiple files or extract page ranges. Alternatively, pypdf's PdfWriter can merge documents and write each page to a separate file for splitting.

Why does my filled PDF form show blank fields in some viewers?

Some viewers fail to render form values without appearance streams. The fill_fillable_fields.py script calls set_need_appearances_writer(True) so viewers regenerate field appearances, though some may show a save-changes dialog.