4

Find the field names of inputtable form fields in a PDF document? I have an editable PDF form that I'm trying to automate the entry of form fields into using python.

In order to do this I must know the "names" of the form fields in the FDF data to input.

See question for background: How can I auto-populate a PDF form in Django/Python?

I don't need to find the names programaticaly from the PDF necessarily, just need to know what they are so if this is possible in Preview/Adobe/etc. PDF readers/editors that is sufficient.

Community
  • 1
  • 1
MikeN
  • 45,039
  • 49
  • 151
  • 227

3 Answers3

6

Previously asked. Have a look at pdftk's dump_data_fields.

Community
  • 1
  • 1
Katriel
  • 120,462
  • 19
  • 136
  • 170
0

I was recently trying to programatically fill in a PDF form but I did not know the fillable field names.

I found https://www.pdffiller.com/ which lets you view the field name if you go into the "Edit PDF mode" (tiny right-side bar that opens a panel).

Then I accidentally found that if you open the PDF in Acrobat Reader (free version) and hover your mouse cursor over the field the field name is shown in a little hint popup. You can use this field name to find and fill the field in code.

enter image description here

David
  • 1,034
  • 11
  • 20
0

I also needed to verify both the names and the options used for checkboxes so I could programmatically fill in the data from my SQLite database.

I tried several PDF tools and ended up using the official Adobe Acrobat Pro application. I got the 7 day free trial and used it to get all the names I needed and then cancelled it.

When you open a fillable PDF form you need to select the More Tools option from the far right toolbar, then select Prepare Form. I added it to the toolbar so it was easier to use. When you do that you will see all the fields that have been created.

Then in the More Tools above the list of field names select Show Field Properties.

Then when you click on any of the fields you get the pop-up that shows all the details, not just the name and type but defaults and more.

I am running on Mac OS X Catalina 10.15.7 I used Adobe Acrobat Pro DC Version 2022.001.20112

OogieM
  • 35
  • 8