pdf

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

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill pdf-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/agents/.agents/skills/pdf
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill pdf-ravitejakarra24

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, and tasks like filling forms, extracting tables, or processing scanned documents each require different approaches and careful coordinate handling. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, watermark, and extract text, tables, images, and metadata using pypdf, pdfplumber, reportlab, qpdf, and poppler-utils. - Form Filling: Fill both fillable AcroForm fields and non-fillable forms via text annotations, with structure extraction, bounding-box validation, and visual verification scripts. - OCR & Creation: Run OCR on scanned PDFs with pytesseract and generate new PDFs with reportlab or pdf-lib. - Use Case: Given a stack of scanned intake forms, convert them to images, determine field coordinates, validate bounding boxes, and produce filled PDFs ready for submission. ## Quick Start Use the pdf skill to merge these three PDF files into a single document and extract the text from the first two pages.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I extract tables from a PDF in Python?

Use pdfplumber's page.extract_tables() method to detect and extract tables from each page. The results can be loaded into pandas DataFrames and exported to Excel or CSV 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 checkbox coordinates, or estimate positions visually from rendered page images. Then add FreeText annotations at those coordinates using pypdf to produce the filled PDF.

What is the difference between pypdf and pdfplumber?

pypdf handles structural operations like merging, splitting, rotating, encryption, and form field updates. pdfplumber focuses on content extraction, providing text with layout, precise character coordinates, and table detection.

Can I extract text from a scanned PDF?

Scanned PDFs contain images rather than text layers, so standard extraction returns 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 those characters render as solid boxes. Use the <sub> and <super> XML 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 similar cat and burst operations if installed.