pdf

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, pytesseract, reportlab, pypdfium2, 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, making tasks like text extraction, form filling, merging, and OCR error-prone and time-consuming without clear guidance. ## Core Features & Use Cases - PDF Manipulation: Merge, split, rotate, encrypt, decrypt, watermark, and crop PDFs using pypdf, qpdf, and pdftk. - Content Extraction: Extract text, tables, metadata, and embedded images with pdfplumber, pypdfium2, and poppler-utils, including OCR for scanned documents via pytesseract. - PDF Creation & Form Filling: Generate new PDFs with reportlab or pdf-lib, and fill both fillable and non-fillable forms using dedicated scripts with bounding-box validation. - Use Case: Given a stack of scanned vendor invoices, convert them to images, run OCR to extract text, pull out table data with pdfplumber, and export the results to an Excel spreadsheet. ## Quick Start Ask the assistant to extract all text and tables from your PDF file, or to merge several PDF documents into one.

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 PDF in Python?

Use pdfplumber to extract text with layout preservation and to detect tables via page.extract_tables(). For simple text extraction, pypdf's page.extract_text() or the pdftotext command-line tool also work.

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

Run the extract_form_structure.py script to detect labels, lines, and checkboxes with 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.

Which Python library should I use for merging PDFs?

pypdf is the recommended choice for merging: create a PdfWriter, add pages from each source PdfReader, and write the output. The qpdf command-line tool offers an equivalent merge with qpdf --empty --pages.

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, 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 markup tags inside Paragraph objects instead.

How do I remove a password from an encrypted PDF?

Use qpdf with the --password and --decrypt flags to produce a decrypted copy, for example qpdf --password=secret --decrypt encrypted.pdf decrypted.pdf. In Python, pypdf's reader.decrypt() method handles password-protected files.