File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
java/com/itextpdf/forms/xfa
resources/com/itextpdf/forms/xfa/XFAFormTest Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ This file is part of the iText (R) project.
57
57
import org .junit .BeforeClass ;
58
58
import org .junit .Test ;
59
59
import org .junit .experimental .categories .Category ;
60
+ import org .w3c .dom .Node ;
60
61
61
62
@ Category (IntegrationTest .class )
62
63
public class XFAFormTest extends ExtendedITextTest {
@@ -141,4 +142,15 @@ public void findFieldNameWithoutDataSet() throws IOException {
141
142
Assert .assertNull (name );
142
143
}
143
144
145
+ @ Test
146
+ public void extractXFADataTest () throws IOException {
147
+ String src = sourceFolder + "xfaFormWithDataSet.pdf" ;
148
+
149
+ PdfDocument pdfDocument = new PdfDocument (new PdfReader (src ));
150
+ XfaForm xfa = new XfaForm (pdfDocument );
151
+
152
+ Node node = xfa .findDatasetsNode ("Number1" );
153
+ Assert .assertNotNull (node );
154
+ Assert .assertEquals ("Number1" , node .getNodeName ());
155
+ }
144
156
}
You can’t perform that action at this time.
0 commit comments