I am using iText to copy a normal PDF file that also contains a stamp created with the
stamp tool. Everything works perfectly, except for the fact that the stamp is not
copied.
What do I need to do to copy the stamp as well as the normal content of the file?
A fragment of my code follows. It is based on the Concat example in the tutorial.
Thanks in advance for any help you can provide.
Michael Harhen
-----------------------
Code fragment:
boolean rotate = isPageRotate(reader, 1);
document = new Document(getPageRectangle(reader, 1, rotate));
PdfWriter writer = PdfWriter.getInstance(document, byteArrayOutputStream);
document.open();
PdfContentByte cb = writer.getDirectContent();
for (int i = 1; i <= numPages; ++i) {
Rectangle pageRectangle = reader.getPageSizeWithRotation(i);
int rotation = getPageRotation(reader, i);
document.setPageSize(getPageRectangle(pageRectangle, rotation, rotate));
document.newPage();
PdfImportedPage page = writer.getImportedPage(reader, i);
addTemplate(cb, page, rotation, rotate, pageRectangle);
}
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions