Skip to main content
Participant
June 5, 2017
Answered

Can drop-down list data be extracted?

  • June 5, 2017
  • 1 reply
  • 1676 views

My customer created a PDF document containing a number of drop-down lists, many of which have a significant number of entries.  Is there any way for me to extract this data so that I can use it in a specification document without having to retype the contents of all the lists?

This topic has been closed for replies.
Correct answer try67

Yes, this can be done using a simple script. The code above will export the values to the JS Console. From there you can copy them to a text file, or something like that. You just need to change the field name in the first line of code.

var f = this.getField("FieldName");

for (var i=0; i<f.numItems; i++) console.println(f.getItemAt(i));

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
June 5, 2017

Yes, this can be done using a simple script. The code above will export the values to the JS Console. From there you can copy them to a text file, or something like that. You just need to change the field name in the first line of code.

var f = this.getField("FieldName");

for (var i=0; i<f.numItems; i++) console.println(f.getItemAt(i));

Participant
January 9, 2024

Can you provide step by step