pdf

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

Updated Jun 21, 2025
One-click install
npx skills add https://github.com/seriiserii825/dotfiles --skill pdf-seriiserii825
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/seriiserii825/dotfiles/tree/main/apps/claude/skills/synced/48e265c5-be08-4ca3-88ab-78707f398de7_1df978a8-b501-4d2b-b556-83317b565971/pdf
Command: npx skills add https://github.com/seriiserii825/dotfiles --skill pdf-seriiserii825

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, Pillow, reportlab, pytesseract, 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 extracting tables, merging documents, or filling forms error-prone and time-consuming. This Skill consolidates proven PDF workflows into one guide with ready-to-run scripts. ## Core Features & Use Cases - Text, Table & Image Extraction: Pull text, structured tables, and embedded images from PDFs using pypdf, pdfplumber, and poppler-utils, including OCR for scanned documents. - PDF Manipulation & Creation: Merge, split, rotate, encrypt, watermark, and generate new PDFs with pypdf, qpdf, and reportlab. - PDF Form Filling: Fill both fillable AcroForm fields and non-fillable forms via text annotations, with structure extraction, bounding-box validation, and visual verification scripts. - Use Case: You receive a stack of government PDF forms with no fillable fields. The Skill extracts the form structure, computes precise field coordinates, validates bounding boxes, and produces completed PDFs ready for submission. ## Quick Start Use the pdf skill to extract all tables from the attached report.pdf and save them to a spreadsheet.

Frequently Asked Questions about pdf

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

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

Extract the form structure with the extract_form_structure.py script to get label, line, and checkbox coordinates, then define entry bounding boxes in a fields.json file. The fill_pdf_form_with_annotations.py script adds text annotations at those positions, and check_bounding_boxes.py validates them first.

How do I extract tables from a PDF in Python?

Use pdfplumber's page.extract_tables() method, which detects table structure and returns rows as lists. You can convert the results to pandas DataFrames and export them to Excel, with custom table settings available for complex layouts.

What is the difference between pypdf and pdfplumber?

pypdf handles structural operations like merging, splitting, rotating, encrypting, and form field updates. pdfplumber focuses on content extraction with precise coordinates, making it better for text layout analysis and table extraction.

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 pytesseract OCR on each page 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 markup 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 with page range selectors like 'qpdf input.pdf --pages . 1-5 -- out.pdf'. The pdftk tool offers equivalent cat and burst operations when available.