-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExtractFields.java
36 lines (24 loc) · 941 Bytes
/
ExtractFields.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import com.adobe.fdf.*;
import com.adobe.fdf.exceptions.*;
import java.util.Iterator;
public class ExtractFields {
public static void main(String[] args) {
try {
String fdfFileName = "/Users/Ross/IdeaProjects/FDF/src/extract.fdf";
//String fdfFileName = "/Users/Ross/IdeaProjects/FDF/src/extractSubmitted.fdf";
FDFDoc fdfinput = new FDFDoc(fdfFileName);
Iterator fieldNameIter = fdfinput.GetFieldNameIterator();
while (fieldNameIter.hasNext()) {
String fieldName = fieldNameIter.next().toString();
String fieldValue = fdfinput.GetValue(fieldName);
System.out.print("fieldName: " + fieldName);
System.out.println("\tfieldValue: " + fieldValue);
}
}
catch (Exception e) {
e.printStackTrace();
} finally {
// close up
}
}
}