hi,
I was wondering if we can add content from one pdf to another existing
pdf.
Actually i have a existing pdf of 20 pages or so. I want to insert e
-sgnatures into it on specific pages of the existing pdf. I used iText to
create the E-signature images on a new pdf . But i want to insert those
image on the new pdf to the existing pdf at a specific location on the page
i mean X,Y position.
I tried using the below code
PdfReader reader = new PdfReader("sig.pdf");
//Document document = new
Document(reader.getPageSizeWithRotation(1));
//PdfCopy copy = new PdfCopy(document, new
FileOutputStream("merged.pdf"));
PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("watermark_pagenumbers.pdf"));
//document.open();
//PdfImportedPage page = copy.getImportedPage(reader, 2);
//copy.addPage(page);
PdfContentByte under;
PdfReader reader2 = new PdfReader("ResultPDF.pdf");
//under = stamp.getUnderContent(1);
under = stamp.getOverContent(1);
under.addTemplate(stamp.getImportedPage(reader2,
3),-120,30);
// closing PdfStamper will generate the new PDF file
stamp.close();
but in this example it is creatina a new pdf , i want be able to insert in
the exsiting PDF.
Is it possible in iText ??
--
View this message in context:
http://www.nabble.com/content-from-pdf-into-another-pdf-tp14917355p14917355.html
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/