pdf

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

2|1|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/dkyazzentwatwa/skill_starter_pack --skill pdf-dkyazzentwatwa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/dkyazzentwatwa/skill_starter_pack/tree/main/pdf
Command: npx skills add https://github.com/dkyazzentwatwa/skill_starter_pack --skill pdf-dkyazzentwatwa

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 merging documents, extracting tables, filling forms, or running 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, pdftotext, and pdfimages, including OCR for scanned documents via pytesseract. - PDF Creation: Generate new PDFs with reportlab or JavaScript libraries like pdf-lib, including styled tables and reports. - Form Filling: Fill both fillable AcroForm fields and non-fillable forms using structure extraction, coordinate validation, and annotation scripts. - Use Case: Given a stack of scanned intake 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 page.

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 writer.add_page, then write the result to a new file. Alternatively, run qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf from the command line.

How do I extract tables from a PDF document?

Use pdfplumber's page.extract_tables() method, which detects table structures and returns rows as lists. You can convert the results to pandas DataFrames and export them to Excel for further analysis.

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

Extract the form structure with pdfplumber to get label and line coordinates, or convert pages to images and estimate positions visually. Then add text annotations at those coordinates using pypdf's FreeText annotation support.

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 and run OCR with pytesseract to recover the text content.

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 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 its pages.