Acrobat 8 pro, windows xp
I need to pull some data from an external file to populate some form fields.
I have successfully imported a text file into my PDF and converted its contents to a string.
The string looks something like this (I used console.println(string); to print it out):
Label 1: Some Data
Label 2: Data
Label 3: More Date
Label 5: Even More Data
So, for example, I need to grab "More Data" and populate it into a Form field in my PDF. The entire string has many lines, and I need to grab about 3 or 4 pieces from it.
Anny suggestions would be helpful.
You need to use the split method to split your single string to an array of sub-strings. First probably using split("\n") to get each separate line, and then split(":") to get the two parts in each line.