pdf

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

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/Dhanuzh/DCode-Core --skill pdf-dhanuzh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/Dhanuzh/DCode-Core/tree/main/crates/dcode-app/assets/builtin-skills/pdf
Command: npx skills add https://github.com/Dhanuzh/DCode-Core --skill pdf-dhanuzh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, reportlab, pdf2image, Pillow, pytesseract, and includes scripts (resource) components.

What problem does it solve? Working with PDF files programmatically is fragmented across many libraries and tools, and filling PDF forms—especially non-fillable ones—requires tedious manual coordinate mapping. This Skill consolidates PDF manipulation into one toolkit with ready-to-run scripts and step-by-step workflows. ## Core Features & Use Cases - Text and Table Extraction: Pull text, tables, and metadata from PDFs using pypdf, pdfplumber, and poppler-utils, with OCR support for scanned documents. - Document Manipulation: Merge, split, rotate, encrypt, watermark, and create PDFs with pypdf, reportlab, and qpdf. - PDF Form Filling: Guided workflows for both fillable forms (field extraction and value injection) and non-fillable forms (visual bounding-box analysis with validation images and annotation overlays). - Use Case: You receive a non-fillable government form as a PDF. The Skill converts pages to images, helps you define entry bounding boxes, validates them with overlay images, and produces a completed PDF with text annotations. ## Quick Start Ask the assistant to extract all tables from a PDF file, or to fill in a PDF form by following the forms workflow.

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?

Convert the PDF pages to PNG images, visually identify entry areas, and define bounding boxes in a fields.json file. Validate the boxes with generated overlay images, then run fill_pdf_form_with_annotations.py to stamp text onto the PDF at those coordinates.

How do I extract tables from a PDF in Python?

Use pdfplumber's page.extract_tables() method, which detects table structures and returns rows as lists. You can load the results into pandas DataFrames and export them to Excel for further analysis.

What is the difference between pypdf and pdfplumber?

pypdf handles structural operations like merging, splitting, rotating, and encryption, while pdfplumber specializes in extracting text and tables with layout awareness. Use pypdf for document manipulation and pdfplumber for data extraction.

Can I extract text from a scanned PDF?

Scanned PDFs contain images rather than text layers, so standard extraction fails. Convert pages to images with pdf2image, then run OCR with pytesseract to recover the text content.

How do I merge or split PDF files from the command line?

Use qpdf with the --empty --pages syntax to merge files or extract page ranges, or run the included merge_pdfs.py and split_pdf.py scripts which wrap pypdf for the same operations.