pdf

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

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/skyrocoster/dnd-kids-resources --skill pdf-skyrocoster
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/skyrocoster/dnd-kids-resources/tree/main/.agents/skills/pdf
Command: npx skills add https://github.com/skyrocoster/dnd-kids-resources --skill pdf-skyrocoster

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, each with different APIs for reading, writing, merging, and form filling. This Skill consolidates proven code patterns and scripts for every common PDF operation, including the difficult case of filling non-fillable forms with precise coordinate placement. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, watermark, and extract metadata using pypdf, qpdf, and pdftk. - Content Extraction: Pull text, tables, and images from PDFs with pdfplumber, pdftotext, and pdfimages, plus OCR support for scanned documents via pytesseract. - PDF Creation: Generate new PDFs with reportlab or JavaScript libraries like pdf-lib, including styled tables and multi-page reports. - Form Filling: Fill both fillable AcroForm fields and non-fillable forms using structure extraction, coordinate validation, and text annotation scripts. - Use Case: You receive a scanned government form with no fillable fields. The Skill extracts the form structure, guides coordinate-based field mapping, validates bounding boxes, and produces a completed PDF with text annotations. ## Quick Start Use the pdf skill to merge the three attached PDF reports into a single document and extract the table from page two.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I merge multiple PDF files in Python?▼

Use pypdf's PdfWriter to combine PDFs by adding pages from each source file with add_page, then write the output. Alternatively, run qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf from the command line.

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

Extract the form structure with pdfplumber to get label and checkbox coordinates, build a fields.json with entry bounding boxes, validate it with check_bounding_boxes.py, then fill it using fill_pdf_form_with_annotations.py which adds FreeText annotations.

What Python library should I use to extract tables from PDFs?▼

pdfplumber is the recommended tool for table extraction, using page.extract_tables() with configurable line-detection settings. Results convert directly to pandas DataFrames for export to Excel or CSV.

Can I extract text from a scanned PDF document?▼

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 image to recover the text.

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

ReportLab's built-in fonts lack Unicode subscript and superscript glyphs, so characters like H₂O render as solid boxes. Use Paragraph XML markup tags <sub> and <super> instead of Unicode characters.

How do I remove a password from an encrypted PDF?▼

Run qpdf --password=yourpassword --decrypt encrypted.pdf decrypted.pdf from the command line. In Python, call reader.decrypt("password") on a pypdf PdfReader before accessing pages.