# PDF Processing Engine

> Eliminate misaligned PDF text and blind form fills with pypdf, pdf-lib, and visual bounding-box image verification.

PDF Processing Engine is a free AI agent skill on Agensi by Sheeyassh. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Sheeyassh](https://www.agensi.io/creators/s1reyash)
- Uses: 1
- Version: 1.0
- Last updated: 2026-11-26
- Security: scan passed (2026-11-26); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/pdf-processing-engine
- Tags: writing-content, pdf-automation, pdf-validation, document-parsing, pdf-forms

## About this skill

Eliminate misaligned PDF text and blind form fills with pypdf, pdf-lib, and visual bounding-box image verification. Pdf Processing Engine combines Python (`pypdf`, `pypdfium2`) and JavaScript (`pdf-lib`) document operations with a visual form-validation loop. Beyond reading, extracting text, merging, splitting, rotating, and inspecting metadata, it converts PDFs to page images (`convert_pdf_to_images.py`) and draws bounding-box validation overlays (`create_validation_image.py`) to verify placement. This closes the gap between blind coordinate scripting and pixel-accurate PDF output.

### What it does
- **Visual & Structural PDF Diagnosis** Audit PDF templates with `check_fillable_fields.py` and `convert_pdf_to_images.py` to expose hidden rotations, missing text layers, and unmapped static form regions.
- **Layout & Coordinate Refinement** Tune existing `pypdf`, `pypdfium2`, or `pdf-lib` merge, split, rotation, and text-extraction code using `reference.md` and eliminate coordinate collisions with `check_bounding_boxes.py`.
- **Visual Validation & Form Delivery** Implement new form-filling workflows from `FORMS.md` and emit annotated page previews via `create_validation_image.py` to visually confirm every field lands inside its target box.
- **Deterministic Deliverables** Each run produces updated Python or JavaScript PDF processing scripts, a verified AcroForm or coordinate map, rendered page images, and annotated bounding-box validation images that visually prove text overlays and form fills align cleanly within template boundaries.

### How it works
1. **Pre-Flight & Scope Audit** verifies workspace boundaries, inputs, and required tools (`filesystem-read`, `filesystem-write`, `pdftotext`, `python3`) before modifying any files.
2. **Core Workflow Execution** runs **Visual & Structural PDF Diagnosis**, **Layout & Coordinate Refinement** using modular, non-destructive steps.
3. **Quality Gate Enforcement** applies skill-specific checks including *PDF Extraction, OCR Fallback & Integrity Check*, *Open-Source Format Fidelity & Non-Destructive Output*.
4. **Verification & Reporting** validates every deliverable against the 7-point checklist and emits an evidence-backed summary.

### Frameworks & tools
Supports `pdfplumber>=0.11.0`, `pypdf>=4.0.0`, `reportlab>=4.1.0`. Uses agent tools: `filesystem-read`, `filesystem-write`, `pdftotext`, `python3`, `shell-exec`. Prerequisites: Python 3.9+ with pypdf, Poppler or pypdfium2 renderer. Compatible with Claude Code, Cursor, Windsurf, Antigravity, Codex CLI, and MCP-enabled agents.

### Why this beats prompting it yourself
Standard PDF code fails quietly when coordinates drift by a few points or when a template turns out to be flat rather than fillable. By inspecting your project's existing PDF scripts and pairing `check_fillable_fields.py` with rendered visual validation images, this skill catches clipped labels, inverted axes, and overlapping fields before documents reach end users. Teams stop guessing coordinates through trial-and-error PDF opens. Instead of ad-hoc prompting, PDF Processing Engine enforces PDF Extraction, OCR Fallback & Integrity Check, Open-Source Format Fidelity & Non-Destructive Output, Pdf Processing Engine Pre-Flight & Deterministic Output Gate alongside a deterministic 7-point verification checklist.

### Use cases
- Debug off-center text overlays on static PDFs by rendering pages and generating visual bounding-box validation images.
- Build automated document packet builders that merge, split, rotate, and extract metadata across Python or Node.js backends.
- Inspect incoming third-party PDFs to separate true fillable AcroForm templates from flat scanned or vector forms.
- Extract clean text and page-level metadata from contracts and reports using `pypdf` and `pypdfium2` best practices.

### Known limitations
Lacks built-in OCR pipelines for transcribing scanned, raster-only PDFs into searchable text. Does not provide multi-process batch CLI runners or automated pandas table-extraction pipelines. Requires external rasterization support (`pypdfium2` or Poppler) to render PDF pages into validation images.

## Requires

- Python 3.9+ with pypdf
- Poppler or pypdfium2 renderer
- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the PDF Processing Engine skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How is Pdf Processing Engine different from Pdf Pro Edition?

Pdf Processing Engine adds an end-to-end visual inspection pipeline (`convert_pdf_to_images.py` and `create_validation_image.py`) so you can render PDF pages to images and visually verify exact bounding-box alignment on tricky static forms.

### Which languages and AI agents does it work with?

It supports Python (`pypdf`, `pypdfium2`) and JavaScript (`pdf-lib`) codebases and works seamlessly with any AI coding agent capable of running local scripts.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
