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

Pdf Processing

  • 16 installs
  • 869 repo stars
  • Updated June 8, 2026
  • beita6969/scienceclaw

pdf-processing is a skill that extracts text and tables from PDFs, fills forms, and merges or splits documents using pdfplumber and pypdf.

About

This skill extracts text and tables from PDF files, fills forms, and merges or splits documents using pdfplumber and pypdf. A developer uses it when a task mentions PDFs, forms, or document extraction. It includes common patterns for exporting to CSV, error handling for empty or scanned pages, and performance tips.

  • Extracts text and tables from PDFs with pdfplumber
  • Merges and splits PDFs with pypdf, plus error handling for scanned pages
  • Notes pdf2image and pytesseract for OCR of scanned documents

Pdf Processing by the numbers

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

pdf-processing capabilities & compatibility

Capabilities
pdf text extraction · pdf table extraction · pdf merge split · pdf form fill
Use cases
pdf parsing · documentation
Pricing
Free
From the docs

What pdf-processing says it does

Extract text and tables from PDF files, fill forms, merge documents.
SKILL.md
Use pdfplumber to extract text from PDFs:
SKILL.md
Page contains no extractable text (might be scanned)
SKILL.md
npx skills add https://github.com/beita6969/scienceclaw --skill pdf-processing

Add your badge

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

Listed on Skillselion
Installs16
repo stars869
Last updatedJune 8, 2026
Repositorybeita6969/scienceclaw

What it does

Extract text and tables from PDFs and merge or split documents using pdfplumber and pypdf.

Who is it for?

Developers extracting text/tables or merging and splitting PDFs in Python

Skip if: Complex production pipelines needing pre-built CLI scripts (use pdf-processing-pro)

When should I use this skill?

The user works with PDF files or mentions PDFs, forms, or document extraction

What you get

Extracted text/tables and merged or split PDF files.

  • extracted text
  • extracted tables
  • merged PDFs

By the numbers

  • 4 named packages (pdfplumber, pypdf, pdf2image, pytesseract)

Files

SKILL.mdMarkdownGitHub ↗

PDF Processing

Quick start

Use pdfplumber to extract text from PDFs:

import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    text = pdf.pages[0].extract_text()
    print(text)

Extracting tables

Extract tables from PDFs with automatic detection:

import pdfplumber

with pdfplumber.open("report.pdf") as pdf:
    page = pdf.pages[0]
    tables = page.extract_tables()

    for table in tables:
        for row in table:
            print(row)

Extracting all pages

Process multi-page documents efficiently:

import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    full_text = ""
    for page in pdf.pages:
        full_text += page.extract_text() + "\n\n"

    print(full_text)

Form filling

For PDF form filling, see FORMS.md for the complete guide including field analysis and validation.

Merging PDFs

Combine multiple PDF files:

from pypdf import PdfMerger

merger = PdfMerger()

for pdf in ["file1.pdf", "file2.pdf", "file3.pdf"]:
    merger.append(pdf)

merger.write("merged.pdf")
merger.close()

Splitting PDFs

Extract specific pages or ranges:

from pypdf import PdfReader, PdfWriter

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

# Extract pages 2-5
for page_num in range(1, 5):
    writer.add_page(reader.pages[page_num])

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

Available packages

  • pdfplumber - Text and table extraction (recommended)
  • pypdf - PDF manipulation, merging, splitting
  • pdf2image - Convert PDFs to images (requires poppler)
  • pytesseract - OCR for scanned PDFs (requires tesseract)

Common patterns

Extract and save text:

import pdfplumber

with pdfplumber.open("input.pdf") as pdf:
    text = "\n\n".join(page.extract_text() for page in pdf.pages)

with open("output.txt", "w") as f:
    f.write(text)

Extract tables to CSV:

import pdfplumber
import csv

with pdfplumber.open("tables.pdf") as pdf:
    tables = pdf.pages[0].extract_tables()

    with open("output.csv", "w", newline="") as f:
        writer = csv.writer(f)
        for table in tables:
            writer.writerows(table)

Error handling

Handle common PDF issues:

import pdfplumber

try:
    with pdfplumber.open("document.pdf") as pdf:
        if len(pdf.pages) == 0:
            print("PDF has no pages")
        else:
            text = pdf.pages[0].extract_text()
            if text is None or text.strip() == "":
                print("Page contains no extractable text (might be scanned)")
            else:
                print(text)
except Exception as e:
    print(f"Error processing PDF: {e}")

Performance tips

  • Process pages in batches for large PDFs
  • Use multiprocessing for multiple files
  • Extract only needed pages rather than entire document
  • Close PDF objects after use

Related skills

FAQ

What library does this skill recommend for extraction?

pdfplumber for text and table extraction; pypdf for manipulation, merging, and splitting.

How does it handle scanned PDFs?

It detects pages with no extractable text and notes pytesseract plus pdf2image for OCR.

This week in AI coding

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

unsubscribe anytime.