Eric Chow
2015-10-14 04:53:21 UTC
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();
}
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();
}