Java/PDF RTF/Form
Версия от 18:01, 31 мая 2010; (обсуждение)
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();
}
}
}