😫 The Pain Point
You have a government PDF form. You need to fill it out for 50 employees. Open PDF -> Click ‘Name’ -> Type -> Click ‘ID’ -> Type… Repeat 50 times. Typos are inevitable.
🚀 Agentic Solution
Mapper: Maps Excel Columns directly to PDF Fields.
Key Features:
- Field Detection: Lists all available fields in the PDF so you know the internal variable names.
- Batch: Generates 50 separate filled PDFs.
⚔️ Phase 1: Commander (Quick Fix)
For filling one form.
Prompt:
“I have
form.pdf(fillable). List all form fields. Then, fill the field ‘Full_Name’ with ‘John Doe’ and save asfilled.pdf.”
Result: A test filled PDF.
🏗️ Phase 2: Architect (Permanent Tool)
For Admin/Compliance.
Engineering Prompt:
**Role:** Python Automation Developer
**Task:** Create a "Bulk PDF Form Filler".
**Requirements:**
1. **GUI:**
* Select Template PDF.
* Select Data Source (Excel).
* **Mapping:** Show list of PDF Fields vs Excel Headers. Allow user to map them.
* "Generate" button.
2. **Logic:**
* Use `pypdf` to access annotations.
* Iterate Excel rows.
* Update field values.
* Save as `[Output_Name].pdf`.
3. **Deliverables:** `pdf_filler.py`, `run.bat` (Windows), `run.sh` (Mac).
🧠 Prompt Decoding
- Fillable PDF: This only works with “Interactive Forms” (AcroForms), not static flat PDFs. The logic requires identifying “Field Names” which are invisible properties of the file.
🛠️ Instructions
- Copy Prompt -> Paste -> Run.
- Map Columns -> Generate.