Rename PDF form fields in bulk

If, like me, you get stuck in renaming thousands of form field names, the JavaScript console included in Acrobat is a good choice. In this you can not only execute any JavaScript code, but also access all content within the PDF (including form fields). Since there is no native function for renaming in the JS-API, the form fields with all properties are copied and created with a new name.


The console must first be activated in Acrobat under "Edit> Settings ..." under "JavaScript":

Rename PDF form fields in bulk

With "CTRL + J" you activate the JavaScript debugger and select the "Console" under "Display:". If you want to execute any JavaScript code, enter it, mark it and execute it with "CTRL + ENTER". The result then appears directly below:

Rename PDF form fields in bulk

The following snippet now renames all form fields so that dots (".") Are replaced by hashes ("#"):

61cbdaf8b97fb21952e382d2e88d50d4

The script can handle all types of form fields (including checkboxes).

Rename PDF form fields in bulk

Back