pdf

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

Updated May 24, 2026
One-click install
npx skills add https://github.com/MWest2020/skill-forge --skill pdf-mwest2020
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/MWest2020/skill-forge/tree/main/skills/pdf
Command: npx skills add https://github.com/MWest2020/skill-forge --skill pdf-mwest2020

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, reportlab, pdf2image, pytesseract, Pillow, pandas, and includes scripts (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 fits tasks like text extraction, merging, form filling, or OCR on scanned documents. ## Core Features & Use Cases - Text and Table Extraction: Pull text and structured tables from PDFs using pypdf and pdfplumber, with OCR support for scanned documents via pytesseract. - PDF Manipulation: Merge, split, rotate, watermark, encrypt, and decrypt PDFs with pypdf, qpdf, or pdftk. - PDF Creation and Form Filling: Generate new PDFs with reportlab and fill both fillable and non-fillable forms using bundled validation and annotation scripts. - Use Case: Given a stack of scanned invoices, convert pages to images, run OCR to extract text, and compile the results into a searchable document. ## Quick Start Ask the assistant to extract all text and tables from a specific PDF file, or to merge several named PDF files into one output document.

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 in Python?

Use pdfplumber to extract text with layout preserved and to pull tables via page.extract_tables(). For basic text and metadata, pypdf's PdfReader works well. Extracted tables can be loaded into pandas DataFrames and exported to Excel.

How do I merge or split PDF files?

Use pypdf's PdfWriter to merge by adding pages from multiple readers, or write each page to a separate file to split. The qpdf command-line tool also handles both: qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf.

How do I fill out a PDF form programmatically?

For fillable PDFs, extract field info with the bundled script, then write values with pypdf's update_page_form_field_values. For non-fillable PDFs, determine bounding box coordinates and overlay text using FreeText annotations.

Can I extract text from a scanned PDF?

Scanned PDFs contain images, not text layers, so standard parsers fail. Convert pages to images with pdf2image, then run OCR with pytesseract to produce searchable text.

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

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