😫 The Pain Point
You have a PDF application form and 100 entries in Excel. Filling each form manually with copy-paste takes forever.
🚀 Agentic Solution
A Form Auto-Filler that maps Excel columns to PDF form fields.
Key Features:
- Field Mapping: Link Excel columns to PDF form fields.
- Batch Generation: Create 100+ filled PDFs automatically.
- Flatten Option: Make filled forms non-editable.
⚔️ Phase 1: Commander (Quick Fix)
For quick form filling.
Prompt:
“I have a PDF form
application.pdfwith fillable fields and an Exceldata.xlsxwith applicant data. Write a Python script using pypdf to:
- Map Fields: Match Excel columns to PDF field names.
- Fill: For each row, fill the form and save.
- Output: Save as
filled/{Applicant_Name}.pdf.- Flatten: Option to make forms non-editable.
Print progress. Handle missing field mappings gracefully.”
Result: Stack of completed forms ready for signature.
🏗️ Phase 2: Architect (Permanent Tool)
For HR/Admissions.
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create a "PDF Form Filler".
**Requirements:**
1. **GUI:**
* Select PDF template.
* Select Excel data source.
* Field mapping interface (dropdown to link columns).
* Filename template (use Excel columns).
* Checkbox: Flatten output.
* Progress bar.
2. **Logic:**
* Detect PDF form fields.
* Fill using pypdf or pdfrw.
* Handle checkboxes and radio buttons.
* Validate data types.
3. **Deliverables:**
* `form_filler.py`
* `run.bat`, `run.sh`
* `requirements.txt`
🧠 Prompt Decoding
- Flatten: Converts form fields to static text, preventing further editing.
🛠️ Instructions
- Prepare PDF with fillable fields (Acrobat or LibreOffice).
- Copy Prompt → Run.