pdf

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

Updated Sep 21, 2026
Ready to run
npx skills add https://github.com/tangyixiao/tangyixiao-skills --skill pdf-tangyixiao
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/tangyixiao/tangyixiao-skills/tree/main/pdf
Command: npx skills add https://github.com/tangyixiao/tangyixiao-skills --skill pdf-tangyixiao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, 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 tasks like text extraction, form filling, merging, and OCR error-prone and time-consuming without clear guidance. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, watermark, and crop PDFs using pypdf, qpdf, and pdftk. - Content Extraction: Extract text, tables, metadata, and embedded images with pdfplumber, pypdfium2, and poppler-utils, including OCR for scanned documents via pytesseract. - PDF Creation & Form Filling: Generate new PDFs with reportlab or pdf-lib, and fill both fillable and non-fillable PDF forms using dedicated scripts with bounding-box validation. - Use Case: Given a stack of scanned application forms, convert them to images, determine field coordinates, validate bounding boxes, and produce filled-in PDFs automatically. ## Quick Start Use the pdf skill to merge the three attached PDF reports into a single document and extract the tables from page two into a spreadsheet.

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 preservation and detect tables via page.extract_tables(). For basic text and metadata, pypdf's PdfReader works, and pdftotext from poppler-utils is the fastest command-line option.

How do I fill out a PDF form programmatically?▼

First run check_fillable_fields.py to detect form fields. Fillable PDFs are filled with fill_fillable_fields.py using extracted field IDs; non-fillable PDFs are filled by adding text annotations at validated bounding-box coordinates.

What is the difference between pypdf and pdfplumber?▼

pypdf handles structural operations like merging, splitting, rotating, and encryption. pdfplumber specializes in content extraction, providing precise character coordinates and table detection for structured data.

Can I extract text from a scanned PDF?▼

Scanned PDFs contain images without a text layer, so standard parsers fail. Convert pages to images with pdf2image, then run pytesseract OCR on each page 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 those characters render as solid boxes. Use the <sub> and <super> XML markup tags inside Paragraph objects instead.

How do I merge or split PDFs from the command line?▼

Use qpdf: merge with 'qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf' and split page ranges with 'qpdf input.pdf --pages . 1-5 -- out.pdf'. pdftk offers equivalent cat and burst operations.