Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/sundial-org-pdf-form-filler/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 67% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-21 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 57% | 0% |
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.
Fill a PDF form with a dictionary of field names and values:
pythonfrom 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, } )
/On and /Off states for PDF viewer rendering/V (value) and /AS (appearance state)Field names should match exactly as they appear in the PDF form. Common patterns:
Herr, Frau, Dienstreise, Geschäftsnummer LfFFull Name, Email, Agree, SubmitDate, DOB, Start DateTo discover field names in your PDF, use list_pdf_fields():
pythonfrom 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 fieldpythonfill_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, } )
Only fill specific fields, leave others blank:
pythondata = {"Name": "Jane Doe"} # Only Name is set fill_pdf_form("form.pdf", "form_filled.pdf", data)
Get all fields and prompt for values:
pythonfrom 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)
Fill multiple PDFs with the same data:
pythonimport 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 )
Some PDF viewers don't render checkboxes immediately. The value is set correctly (/On or /Off), but appearance isn't regenerated. Try opening in:
Use list_pdf_fields() to confirm exact field names. PDF forms can be tricky:
Field_1 instead of descriptive names)Some PDFs have narrow text fields. Either:
See scripts/fill_pdf_form.py for the full implementation using pdfrw.
Other measured skills in the registry, with their headline benchmark lift.