Beispiel #1
0
        // Currently iText xfdf implementation works with the fields in the following way: when the <value> tag with text
        // contents is found, it is considered to be the value of the field. All other <value> tags are ignored.
        public void listInSetField(String dest)
        {
            String      pdfForm     = sourceFolder + "simpleRegistrationForm.pdf";
            String      xfdf        = sourceFolder + "list_register.xfdf";
            PdfDocument pdfDocument = new PdfDocument(
                new PdfReader(new FileStream(pdfForm, FileMode.Open, FileAccess.Read)),
                new PdfWriter(new FileStream(dest, FileMode.Create)));
            XfdfObjectFactory factory    = new XfdfObjectFactory();
            XfdfObject        xfdfObject = factory.CreateXfdfObject(new FileStream(xfdf, FileMode.Open, FileAccess.Read));

            xfdfObject.MergeToPdf(pdfDocument, pdfForm);
            pdfDocument.Close();
        }