pdf

Read, extract, merge, and modify PDF documents using Python libraries.

Updated Nov 26, 2025
One-click install
npx skills add https://github.com/guiledo/dotfiles --skill pdf-guiledo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/guiledo/dotfiles/tree/main/opencode/.config/opencode/skills/pdf
Command: npx skills add https://github.com/guiledo/dotfiles --skill pdf-guiledo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables end-to-end PDF handling, including reading, extracting text and tables, merging multiple PDFs, splitting pages, rotating, watermarking, creating new PDFs, filling forms, encrypting/decrypting, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

Core Features & Use Cases

  • Read and extract text and tables from PDFs.
  • Merge or split PDFs, rotate pages, and add watermarks.
  • Fill forms, encrypt/decrypt, extract images, and OCR for searchability.
  • Use case: Automate the processing of document collections by consolidating multiple PDFs into a single file and extracting key data.

Quick Start

Extract all text from input.pdf and merge it with another document to create output.pdf.

Frequently Asked Questions about pdf

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

FAQPage Schema
How do I extract text and tables from a scanned PDF using OCR?

To extract text from scanned PDFs, OCR processing renders pages into images using pdf2image and Pillow, enabling searchable text extraction. This makes scanned documents fully searchable and machine-readable for downstream data processing.

Can I merge multiple PDF files and add a watermark to the combined document?

Yes, you can merge multiple PDFs into a single file and apply watermarks across pages. This workflow consolidates document collections while embedding branding or security marks directly into the output PDF stream.

Does this PDF processing approach support filling forms and encrypting the output?

Yes, PDF form filling and encryption are fully supported. You can populate form fields programmatically and apply encryption to secure the output document, ensuring sensitive data remains protected across multiple pages.

What's the best way to extract images from a PDF document?

Extracting images from PDFs involves parsing the document stream to isolate embedded image objects. Using libraries like pypdf and pdfplumber, you can render and save embedded images for separate viewing or processing.

Do I need Python libraries like pypdf and pdfplumber to split and rotate PDF pages?

Yes, pypdf and pdfplumber are required to parse and modify PDF streams for splitting and rotating pages. These dependencies provide the core functionality to manipulate document structure and render page content accurately.

Why does text extraction fail on some PDF documents?

Text extraction fails when PDFs contain scanned images instead of embedded text streams, requiring OCR to process. Using pdf2image to render pages allows OCR to recognize text, resolving extraction failures on image-only documents.