1.3k★by raulsimpetru
pdf-form-filler – OpenClaw Skill
pdf-form-filler is an OpenClaw Skills integration for coding workflows. Fill PDF forms programmatically with text values and checkboxes. Use when you need to populate fillable PDF forms (government forms, applications, surveys, etc.) with data. Supports setting text fields and checkboxes with proper appearance states for visual rendering.
Skill Snapshot
| name | pdf-form-filler |
| description | Fill PDF forms programmatically with text values and checkboxes. Use when you need to populate fillable PDF forms (government forms, applications, surveys, etc.) with data. Supports setting text fields and checkboxes with proper appearance states for visual rendering. OpenClaw Skills integration. |
| owner | raulsimpetru |
| repository | raulsimpetru/pdf-form-filler |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @raulsimpetru/pdf-form-filler |
| last updated | Feb 7, 2026 |
Maintainer

name: pdf-form-filler description: Fill PDF forms programmatically with text values and checkboxes. Use when you need to populate fillable PDF forms (government forms, applications, surveys, etc.) with data. Supports setting text fields and checkboxes with proper appearance states for visual rendering. version: 0.2.0
PDF Form Filler
Programmatically fill PDF forms with text values and checkboxes. Uses pdfrw to set form field values while preserving appearance streams for proper PDF viewer rendering.
Quick Start
Fill a PDF form with a dictionary of field names and values:
from pdf_form_filler import fill_pdf_form
fill_pdf_form(
input_pdf="form.pdf",
output_pdf="form_filled.pdf",
data={
"Name": "John Doe",
"Email": "john@example.com",
"Herr": True, # Checkbox
"Dienstreise": True,
}
)
Features
- Text fields: Set any text value (names, dates, addresses, etc.)
- Checkboxes: Set boolean values (True for checked, False/None for unchecked)
- Appearance states: Properly sets
/Onand/Offstates for PDF viewer rendering - Preserves structure: Doesn't strip form functionality—can be further edited
- No dependencies: Uses pdfrw (lightweight, pure Python)
How It Works
- Opens the PDF template
- Iterates through form fields
- Sets values for matching field names
- Handles checkboxes by setting both
/V(value) and/AS(appearance state) - Saves the filled PDF
Field Name Matching
Field names should match exactly as they appear in the PDF form. Common patterns:
- German forms:
Herr,Frau,Dienstreise,Geschäftsnummer LfF - English forms:
Full Name,Email,Agree,Submit - Date fields:
Date,DOB,Start Date
To discover field names in your PDF, use list_pdf_fields():
from pdf_form_filler import list_pdf_fields
fields = list_pdf_fields("form.pdf")
for field_name, field_type in fields:
print(f"{field_name}: {field_type}")
Field types:
text: Text input fieldcheckbox: Boolean checkboxradio: Radio buttondropdown: Dropdown selectsignature: Signature field
Example: Job Application Form
fill_pdf_form(
input_pdf="job_application.pdf",
output_pdf="job_application_filled.pdf",
data={
"Full Name": "Jane Smith",
"Email": "jane.smith@example.com",
"Phone": "555-1234",
"Position": "Software Engineer",
"Years Experience": "5",
# Checkboxes
"Willing to relocate": True,
"Available immediately": False,
"Background check consent": True,
}
)
Advanced Usage
Partial fills
Only fill specific fields, leave others blank:
data = {"Name": "Jane Doe"} # Only Name is set
fill_pdf_form("form.pdf", "form_filled.pdf", data)
Dynamic field detection
Get all fields and prompt for values:
from pdf_form_filler import list_pdf_fields
fields = list_pdf_fields("form.pdf")
data = {}
for field_name, field_type in fields:
if field_type == "text":
data[field_name] = input(f"Enter {field_name}: ")
elif field_type == "checkbox":
data[field_name] = input(f"Check {field_name}? (y/n): ").lower() == 'y'
fill_pdf_form("form.pdf", "form_filled.pdf", data)
Batch fills
Fill multiple PDFs with the same data:
import os
from pdf_form_filler import fill_pdf_form
data = {"Name": "John Doe", "Date": "2026-01-24"}
for filename in os.listdir("forms/"):
if filename.endswith(".pdf"):
fill_pdf_form(
f"forms/{filename}",
f"forms_filled/{filename}",
data
)
Troubleshooting
Checkboxes not showing visually
Some PDF viewers don't render checkboxes immediately. The value is set correctly (/On or /Off), but appearance isn't regenerated. Try opening in:
- Adobe Reader (will render automatically)
- Firefox (has better form support)
- evince or okular on Linux (usually works)
Field names not found
Use list_pdf_fields() to confirm exact field names. PDF forms can be tricky:
- Some use unusual names (e.g.,
Field_1instead of descriptive names) - Some have nested field structures
Text appears cut off
Some PDFs have narrow text fields. Either:
- Use shorter values
- Reduce font size in the PDF template itself
- Manual editing after filling
Bundled Script
See scripts/fill_pdf_form.py for the full implementation using pdfrw.
pdf-form-filler
Fill PDF forms programmatically with text and checkboxes.
A Clawdbot skill for populating fillable PDF forms (government forms, applications, surveys, etc.) with data while preserving proper appearance states for PDF viewer rendering.
Features
- Text fields: Set any text value (names, dates, addresses, etc.)
- Checkboxes: Set boolean values (True/False) with proper
/On/Offstates - Field detection: Discover all form fields in a PDF
- Batch processing: Fill multiple PDFs with the same or different data
- No dependencies: Uses pdfrw (lightweight, pure Python)
Quick Start
from scripts.fill_pdf_form import fill_pdf_form
fill_pdf_form(
input_pdf="form.pdf",
output_pdf="form_filled.pdf",
data={
"Full Name": "John Doe",
"Email": "john@example.com",
"I agree": True,
}
)
Installation
-
Requires Python 3.7+
-
Install pdfrw:
pip install pdfrw -
Use the skill in Clawdbot or run standalone
Documentation
- SKILL.md - Complete skill documentation with features and examples
- references/examples.md - 10+ usage examples and patterns
Usage Examples
List PDF fields
from scripts.fill_pdf_form import list_pdf_fields
fields = list_pdf_fields("form.pdf")
for field_name, field_type in fields:
print(f"{field_name}: {field_type}")
Batch fill
import os
from scripts.fill_pdf_form import fill_pdf_form
data = {"Name": "Jane Doe", "Date": "2026-01-24"}
for filename in os.listdir("forms/"):
if filename.endswith(".pdf"):
fill_pdf_form(f"forms/{filename}", f"output/{filename}", data)
Interactive mode
from scripts.fill_pdf_form import list_pdf_fields, fill_pdf_form
pdf_path = "form.pdf"
fields = list_pdf_fields(pdf_path)
data = {}
for field_name, field_type in fields:
if field_type == "text":
data[field_name] = input(f"Enter {field_name}: ")
elif field_type == "checkbox":
data[field_name] = input(f"Check {field_name}? (y/n): ").lower() == 'y'
fill_pdf_form(pdf_path, "form_filled.pdf", data)
CLI Usage
python scripts/fill_pdf_form.py input.pdf output.pdf data.json
Where data.json:
{
"Full Name": "John Doe",
"Email": "john@example.com",
"Approved": true
}
Troubleshooting
Checkboxes not showing visually
The value is set correctly (/On or /Off), but some PDF viewers don't regenerate the appearance stream. Try:
- Adobe Reader (renders automatically)
- Firefox
- evince or okular (Linux)
The data is preserved; just the visual appearance differs by viewer.
Field names not found
Use list_pdf_fields() to confirm exact field names:
from scripts.fill_pdf_form import list_pdf_fields
fields = list_pdf_fields("problem_form.pdf")
print("Available fields:")
for name, _ in fields:
print(f" '{name}'")
License
MIT
Contributing
Improvements welcome. Please test with real PDFs before submitting changes.
Built with pdfrw. Made for Clawdbot.
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
FAQ
How do I install pdf-form-filler?
Run openclaw add @raulsimpetru/pdf-form-filler in your terminal. This installs pdf-form-filler into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/raulsimpetru/pdf-form-filler. Review commits and README documentation before installing.
