You should certainly read chapter 6 of the book. Assuming you have read that
One way could be following using PdfImportedPage which is a subclass of
PdfPTemplate:
PdfImportedPage currentPage = pages[pageNumber];
// Following is the writer for the document being build not
the one imported
PdfContentByte content = writer.getDirectContentUnder();
// Here add the plain page
content.addTemplate(currentPage, 0, 0);
document.newPage();
You can also convert PdfImportedPage to image as following and add img to
document as you would like (This may internally be very similar to the
previous one)
Image pageImg = Image.getInstance(pdfImportedPage);
Having said that I am not very familiar with the internals of these methods.
This is just one simple way I see looking at the API. Bruno or others may
advise a more efficient method.
Good luck
Nurettin
On Mon, Jan 10, 2011 at 11:46 AM, karthick <[email protected]>wrote:
>
> I generate a pdf document (not based on acro fields) and in-between the
> document I should be able to insert other document. I could read and get
> the
> input stream but I don't know how to print this new doc. inside existing
> one. Any pointers? Thanks.
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/How-can-I-acheive-this-one-tp3207560p3207560.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Gaining the trust of online customers is vital for the success of any
> company
> that requires sensitive data to be transmitted over the Web. Learn how to
> best implement a security strategy that keeps consumers' information secure
> and instills the confidence they need to proceed with transactions.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> 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
>
--
Nurettin DAG
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
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