Hello, I use PdfSmartCopy to merge two PDF files.
One of the PDF file contains a Digital Signature. After I used PdfSmartCopy to merge them, there is not any signature filed in the side bar of Adobe reader. If I click on the signature field in the pdf page, it shows the signature data is corrupted. Is there anything I miss to do? Please help! The following is my code to merge two files: OutputStream os = new FileOutputStream(out); Document document = new Document(); PdfSmartCopy copy = new PdfSmartCopy(document, os); document.open(); String[] files = { "pdf_has_signature.pdf", "another_pdf.pdf" }; PdfReader reader; int n; for (int i = 0; i < files.length; i++) { reader = new PdfReader(files[i]); // loop over the pages in that document n = reader.getNumberOfPages(); for (int page = 1; page <= n; page++) { copy.addPage(copy.getImportedPage(reader, page)); } cop copy.freeReader(reader); reader.close(); }
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php