Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ainergiz avatar

Pdf

  • 2 installs
  • Updated January 7, 2026
  • ainergiz/mac-setup-guide

pdf is a Claude Code skill for extracting text and tables, creating, merging, splitting, and filling PDF documents and forms.

About

pdf is a Claude Code skill for programmatic PDF processing. It covers text and table extraction, creating, merging, splitting, rotating, and watermarking PDFs, and filling PDF forms using pypdf, pdfplumber, and command-line tools. A developer uses it when Claude must generate or analyze PDF documents or fill out PDF forms at scale.

  • Extracts text and tables with pypdf, pdfplumber, and pdftotext
  • Merges, splits, rotates, watermarks, and password-protects PDFs
  • Bundled scripts fill fillable and annotation-based PDF forms

Pdf by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #548 of 687 Office & Documents skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

pdf capabilities & compatibility

Capabilities
pdf extraction · pdf forms · pdf merge split · text extraction
Use cases
pdf parsing · documentation · data analysis
Pricing
Free
From the docs

What pdf says it does

This guide covers essential PDF processing operations using Python libraries and command-line tools.
SKILL.md
If you need to fill out a PDF form, read forms.md and follow its instructions.
SKILL.md
npx skills add https://github.com/ainergiz/mac-setup-guide --skill pdf

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
Last updatedJanuary 7, 2026
Repositoryainergiz/mac-setup-guide

What it does

Extracting text and tables, creating, merging, splitting, and filling PDF documents and forms.

Who is it for?

Programmatic PDF text/table extraction, assembly, and form filling.

Skip if: Word or PowerPoint files, which have their own skills.

When should I use this skill?

When Claude needs to fill a PDF form or programmatically process, generate, or analyze PDF documents at scale.

What you get

PDFs extracted, assembled, or filled correctly using the appropriate Python or CLI tool.

  • extracted PDF text and tables
  • merged, split, or filled PDF files

By the numbers

  • Uses 2 core Python libraries (pypdf, pdfplumber)
  • 9 form and processing scripts bundled

Files

SKILL.mdMarkdownGitHub ↗

PDF Processing Guide

Overview

This guide covers essential PDF processing operations using Python libraries and command-line tools. For advanced features, JavaScript libraries, and detailed examples, see reference.md. If you need to fill out a PDF form, read forms.md and follow its instructions.

Quick Start

from pypdf import PdfReader, PdfWriter

# Read a PDF
reader = PdfReader("document.pdf")
print(f"Pages: {len(reader.pages)}")

# Extract text
text = ""
for page in reader.pages:
    text += page.extract_text()

Python Libraries

pypdf - Basic Operations

Merge PDFs
from pypdf import PdfWriter, PdfReader

writer = PdfWriter()
for pdf_file in ["doc1.pdf", "doc2.pdf", "doc3.pdf"]:
    reader = PdfReader(pdf_file)
    for page in reader.pages:
        writer.add_page(page)

with open("merged.pdf", "wb") as output:
    writer.write(output)
Split PDF
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
    writer = PdfWriter()
    writer.add_page(page)
    with open(f"page_{i+1}.pdf", "wb") as output:
        writer.write(output)
Extract Metadata
reader = PdfReader("document.pdf")
meta = reader.metadata
print(f"Title: {meta.title}")
print(f"Author: {meta.author}")
print(f"Subject: {meta.subject}")
print(f"Creator: {meta.creator}")
Rotate Pages
reader = PdfReader("input.pdf")
writer = PdfWriter()

page = reader.pages[0]
page.rotate(90)  # Rotate 90 degrees clockwise
writer.add_page(page)

with open("rotated.pdf", "wb") as output:
    writer.write(output)

pdfplumber - Text and Table Extraction

Extract Text with Layout
import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        text = page.extract_text()
        print(text)
Extract Tables
with pdfplumber.open("document.pdf") as pdf:
    for i, page in enumerate(pdf.pages):
        tables = page.extract_tables()
        for j, table in enumerate(tables):
            print(f"Table {j+1} on page {i+1}:")
            for row in table:
                print(row)
Advanced Table Extraction
import pandas as pd

with pdfplumber.open("document.pdf") as pdf:
    all_tables = []
    for page in pdf.pages:
        tables = page.extract_tables()
        for table in tables:
            if table:  # Check if table is not empty
                df = pd.DataFrame(table[1:], columns=table[0])
                all_tables.append(df)

# Combine all tables
if all_tables:
    combined_df = pd.concat(all_tables, ignore_index=True)
    combined_df.to_excel("extracted_tables.xlsx", index=False)

Command-Line Tools

pdftotext (poppler-utils)

# Extract text
pdftotext input.pdf output.txt

# Extract text preserving layout
pdftotext -layout input.pdf output.txt

# Extract specific pages
pdftotext -f 1 -l 5 input.pdf output.txt  # Pages 1-5

qpdf

# Merge PDFs
qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf

# Split pages
qpdf input.pdf --pages . 1-5 -- pages1-5.pdf
qpdf input.pdf --pages . 6-10 -- pages6-10.pdf

# Rotate pages
qpdf input.pdf output.pdf --rotate=+90:1  # Rotate page 1 by 90 degrees

# Remove password
qpdf --password=mypassword --decrypt encrypted.pdf decrypted.pdf

pdftk (if available)

# Merge
pdftk file1.pdf file2.pdf cat output merged.pdf

# Split
pdftk input.pdf burst

# Rotate
pdftk input.pdf rotate 1east output rotated.pdf

Common Tasks

Add Watermark

from pypdf import PdfReader, PdfWriter

# Create watermark (or load existing)
watermark = PdfReader("watermark.pdf").pages[0]

# Apply to all pages
reader = PdfReader("document.pdf")
writer = PdfWriter()

for page in reader.pages:
    page.merge_page(watermark)
    writer.add_page(page)

with open("watermarked.pdf", "wb") as output:
    writer.write(output)

Extract Images

# Using pdfimages (poppler-utils)
pdfimages -j input.pdf output_prefix

# This extracts all images as output_prefix-000.jpg, output_prefix-001.jpg, etc.

Password Protection

from pypdf import PdfReader, PdfWriter

reader = PdfReader("input.pdf")
writer = PdfWriter()

for page in reader.pages:
    writer.add_page(page)

# Add password
writer.encrypt("userpassword", "ownerpassword")

with open("encrypted.pdf", "wb") as output:
    writer.write(output)

Quick Reference

TaskBest ToolCommand/Code
Merge PDFspypdfwriter.add_page(page)
Split PDFspypdfOne page per file
Extract textpdfplumberpage.extract_text()
Extract tablespdfplumberpage.extract_tables()
Command line mergeqpdfqpdf --empty --pages ...
Fill PDF formspdf-lib or pypdf (see forms.md)See forms.md

Next Steps

  • For advanced pypdfium2 usage, see reference.md
  • For JavaScript libraries (pdf-lib), see reference.md
  • If you need to fill out a PDF form, follow the instructions in forms.md
  • For troubleshooting guides, see reference.md

Related skills

FAQ

Which libraries does pdf use?

pypdf and pdfplumber in Python plus command-line tools like pdftotext, qpdf, and pdftk.

Can it fill PDF forms?

Yes, it reads forms.md and uses bundled scripts to fill fillable fields or add annotations.

Office & Documentsworkflownotes

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.