pdf

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

3|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill pdf-wopal-cn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/wopal-cn/wopal-space-ontology/tree/main/skills/pdf
Command: npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill pdf-wopal-cn

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, 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, and watermark 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 forms using dedicated scripts with coordinate validation. - Use Case: Given a stack of scanned vendor invoices, convert them to images, run OCR to extract text, pull line-item tables into a spreadsheet, and merge the results into a single archived PDF. ## Quick Start Ask the assistant to extract all text and tables from your PDF file, or to merge several PDFs into one 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 detect tables via page.extract_tables(). For simple text extraction, pypdf's page.extract_text() or the pdftotext command-line tool also work.

How do I merge or split PDF files?

Use pypdf's PdfWriter to add pages from multiple readers and write a merged file, or write each page to its own file to split. The qpdf command-line tool also supports merging and page-range splitting.

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 coordinates via fill_pdf_form_with_annotations.py.

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 pytesseract OCR on each image 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.