pdf

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

Updated May 17, 2026
One-click install
npx skills add https://github.com/irrit-us/agent_misc --skill pdf-irrit-us
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/irrit-us/agent_misc/tree/main/skills/pdf
Command: npx skills add https://github.com/irrit-us/agent_misc --skill pdf-irrit-us

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, Pillow, pytesseract, reportlab, pypdfium2, 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, and tasks like filling forms, extracting tables, or handling scanned documents each require different approaches and coordinate systems that are easy to get wrong. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, watermark, and extract text, tables, images, and metadata using pypdf, pdfplumber, reportlab, qpdf, and poppler-utils. - Form Filling Workflows: Fill both fillable AcroForm PDFs (via field extraction and validation scripts) and non-fillable PDFs (via structure extraction or visual coordinate estimation with annotation overlays). - OCR and Advanced Processing: Run OCR on scanned PDFs with pytesseract, render pages to images with pypdfium2, and use JavaScript libraries like pdf-lib and pdfjs-dist for browser-based workflows. - Use Case: Given a stack of scanned intake forms, convert them to images, determine field coordinates, validate bounding boxes, and produce filled PDFs with text annotations placed at exact positions. ## Quick Start Use the pdf skill to merge these three PDF files into a single document and extract the text from the first page.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I fill a PDF form with Python?▼

First check whether the PDF has fillable fields using pypdf's get_fields method. For fillable forms, extract field info to JSON, map values to field IDs, and write them with PdfWriter. For non-fillable PDFs, add FreeText annotations at computed coordinates.

How do I extract tables from a PDF file?▼

Use pdfplumber's extract_tables method, which detects cell boundaries and returns rows as lists. You can convert results to pandas DataFrames and export to Excel, with custom table settings for complex layouts.

What is the difference between pypdf and pdfplumber?▼

pypdf handles structural operations like merging, splitting, rotating, encryption, and form field updates. pdfplumber focuses on content extraction with precise coordinates, making it better for text layout analysis and table detection.

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.

Why do subscript characters render as black boxes in reportlab PDFs?▼

ReportLab's built-in fonts lack Unicode subscript and superscript glyphs, so those characters render as solid boxes. Use the <sub> and <super> XML markup tags inside Paragraph objects instead.

How do I fill a PDF that has no fillable form fields?▼

Extract text labels, lines, and checkbox coordinates with pdfplumber-based structure extraction, or estimate positions visually from rendered page images. Then validate bounding boxes and add FreeText annotations at those coordinates with pypdf.