PDF Editing Issues

List and Export Acrobat PDF Form Field Names with JavaScript

Camila MilosovichCamila Milosovich Nov 18, 2026 869 views

Question details

List and export interactive PDF form field names for review or localization.

List and Export Acrobat PDF Form Field Names with JavaScript
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A user wants to review form field metadata and consider translating it.
Observed behavior
Acrobat JavaScript can enumerate field names and print them to the console for copying.
Before you start

Open the PDF in Acrobat and confirm it contains interactive form fields. Make sure Acrobat JavaScript is enabled in Preferences before using the JavaScript console.

Solution 1Recommended

List and copy PDF form field names from the Acrobat JavaScript console

Use this method to review field names or copy them into a separate text file.

1
Open the PDF and console

Open the form in Acrobat, then open the JavaScript Debugger console using Ctrl+J on Windows or Command+J on macOS.

2
Enter the script

Paste this script into the console: for (var i = 0; i < this.numFields; i++) { var fieldName = this.getNthFieldName(i); var field = this.getField(fieldName); if (field) console.println(field.name); }

3
Run and copy the results

Select the script and run it with Ctrl+Enter on Windows or Command+Enter on macOS. Select the printed names in the console and copy them into a text editor or spreadsheet.

List and copy PDF form field names from the Acrobat JavaScript console
Export and import limitations: This script prints field names; it does not create an export file or import translated names. Renaming fields can affect calculations, scripts, and relationships between fields.
Free Microsoft Office alternative

Review PDFs and Office files with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. Its format compatibility makes it easy to move existing files into your workflow. Use Acrobat for the JavaScript field-enumeration task described above.

Open and review PDF documents alongside Office files.Compatible with Microsoft Word, Excel, and PowerPoint formats.Familiar tools make it easy to move between common document tasks.Free and lightweight for everyday document work.
QA img-9

Frequently Asked Questions

How do I save the list of field names?

After running the script in Acrobat's JavaScript console, select and copy the printed names, then paste them into a text editor or spreadsheet and save the file.

Can the script import translated field names?

No. The script only lists existing names. Importing or renaming fields would require a separate method, and changes can affect scripts, calculations, and field relationships.

Why did the console return no field names?

Check that the open PDF contains interactive form fields and that JavaScript is enabled in Acrobat Preferences. A scanned or flattened form may have visible boxes but no interactive fields to enumerate.

What should I translate instead of internal field names?

In Prepare a form, open a field's properties and translate its Tooltip. You can also translate editable visible labels through Edit a PDF while keeping internal names unchanged.