pdf

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

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/littlt-momo-c-yfc/skills --skill pdf-littlt-momo-c-yfc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/littlt-momo-c-yfc/skills/tree/main/skills/scientific-toolkit-skill/references/scientific-skills/pdf
Command: npx skills add https://github.com/littlt-momo-c-yfc/skills --skill pdf-littlt-momo-c-yfc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, Pillow, reportlab, pytesseract, 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 handles tasks like text extraction, form filling, merging, or OCR on scanned documents. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, and watermark PDFs using pypdf, qpdf, and pdftk. - Content Extraction: Extract text, tables, metadata, and embedded images with pdfplumber, pypdf, and poppler-utils, including OCR for scanned documents via pytesseract. - PDF Creation & Form Filling: Generate new PDFs with reportlab and fill both fillable and non-fillable 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 PDFs automatically. ## Quick Start Use the pdf skill to merge these three PDF files into a single document and extract the text from the first chapter.

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

How do I fill out a PDF form programmatically?

First run check_fillable_fields.py to detect fillable fields. For fillable PDFs, extract field info and use fill_fillable_fields.py with a JSON of values. For non-fillable PDFs, determine coordinates and add text annotations with fill_pdf_form_with_annotations.py.

Which Python library should I use to merge or split PDFs?

pypdf handles merging and splitting through PdfWriter and PdfReader by adding pages and writing output files. The qpdf command-line tool is an alternative that supports complex page ranges and batch splitting.

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 pytesseract OCR on each page to recover 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.