Esempio n. 1
0
        public virtual void FindFieldName()
        {
            String      inFileName  = sourceFolder + "TextField1.pdf";
            PdfDocument pdfDocument = new PdfDocument(new PdfReader(inFileName));
            PdfAcroForm acroForm    = PdfAcroForm.GetAcroForm(pdfDocument, true);
            XfaForm     xfaForm     = acroForm.GetXfaForm();

            xfaForm.FindFieldName("TextField1");
            String secondRun = xfaForm.FindFieldName("TextField1");

            NUnit.Framework.Assert.IsNotNull(secondRun);
        }
Esempio n. 2
0
        public virtual void FindFieldNameWithoutDataSet()
        {
            String      inFileName  = sourceFolder + "TextField1_empty.pdf";
            PdfDocument pdfDocument = new PdfDocument(new PdfReader(inFileName));
            PdfAcroForm acroForm    = PdfAcroForm.GetAcroForm(pdfDocument, true);
            XfaForm     xfaForm     = acroForm.GetXfaForm();
            String      name        = xfaForm.FindFieldName("TextField1");

            NUnit.Framework.Assert.IsNull(name);
        }