Concatenate Forms from existing pdf documents : Form « PDF RTF « Java






Concatenate Forms from existing pdf documents

import java.io.FileOutputStream;

import com.lowagie.text.pdf.PdfCopyFields;
import com.lowagie.text.pdf.PdfReader;

public class ConcatenateFormsPDF {

  public static void main(String[] args) {
    try {
      PdfReader reader1 = new PdfReader("SimpleRegistrationForm.pdf");
      PdfReader reader2 = new PdfReader("SimpleRegistrationForm.pdf");
      PdfCopyFields copy = new PdfCopyFields(new FileOutputStream("ConcatenateFormsPDF.pdf"));
      copy.addDocument(reader1);
      copy.addDocument(reader2);
      copy.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}

           
       








itext.zip( 1,748 k)

Related examples in the same category