pdf

Inspect, create, edit, and validate PDF files with coverage manifests using pypdf, pdfplumber, and reportlab.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/truongnat/Restly --skill pdf-truongnat
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/truongnat/Restly/tree/main/.agents/skills/pdf
Command: npx skills add https://github.com/truongnat/Restly --skill pdf-truongnat

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with PDFs programmatically often leads to silent data loss, unsupported structures, or unverifiable output. This Skill enforces a supported-lossless contract: every inspect, create, edit, or validate operation produces a coverage manifest that must reach coverage_ratio=1.0 before any PDF is published. ## Core Features & Use Cases - PDF Inspection: Extract page text, tables, and metadata (title, author) into a structured coverage inventory using pypdf and pdfplumber. - PDF Creation & Editing: Generate text-based PDFs from JSON specs with reportlab, or reorder pages and update metadata on existing files. - Validation with Hard Guarantees: Block encrypted and XFA PDFs, mark missing optional tools (Tesseract, Poppler) as skipped rather than false-passing, and verify output against the spec before publishing. - Use Case: You receive a contract PDF and need to reorder its pages and update the title metadata. The Skill performs the edit, re-inspects the result, and only publishes when the coverage manifest confirms nothing was dropped. ## Quick Start Ask the agent to inspect a PDF file and produce its coverage manifest, for example: "Inspect report.pdf and show me its page text, tables, and metadata coverage."

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?▼

Run the CLI inspect command with the skill's virtualenv Python on your PDF file. It uses pdfplumber to extract per-page text and tables and pypdf for metadata, writing everything into a coverage manifest JSON.

How do I create a PDF from a JSON spec with reportlab?▼

Pass a JSON spec containing pages with text plus optional title and author properties to the create command. The CLI renders pages with reportlab, validates the output against the spec, and only publishes when coverage_ratio reaches 1.0.

Can this tool edit encrypted or XFA form PDFs?▼

No. Encrypted PDFs and XFA forms are explicitly unsupported and blocked. The inspect step marks them as unsupported in the coverage manifest, which prevents any create or edit operation from publishing them.

What Python libraries are required for PDF processing here?▼

The skill requires pypdf, pdfplumber, and reportlab, installed into a private virtualenv by running scripts/setup.py. Tesseract and Poppler are optional; if absent, OCR and raster checks are marked skipped rather than falsely passed.

Why does PDF validation fail with a coverage error?▼

Validation fails when the output contains unsupported structures, page counts mismatch the spec, or expected text is missing after an edit. The CLI exits with a COVERAGE_ERROR and does not publish the file until coverage_ratio equals 1.0.