On 22/05/2012 11:25, karthik wrote:
> I didn't find direct method to addImage in PdfStamper api. I'm getting below
> error if im using stamper.getOverContent .
> (Exception in thread "main" java.lang.RuntimeException: Inconsistent
> writers. Are you mixing two documents?)

Seems like you're mixing writers. This means that you are using the 
PdfContentByte from one writer (for instance the one obtained from 
PdfStamper) with a PdfContentByte from another writer (for instance: 
you're trying to add a PdfImportedPage tied to a PdfWriter to the 
content of the PdfStamper).

> Actually I'm trying to do is create a PDF file from pdf templates  and
> adding images in some pages. Im using PdfWriter for getting contentByte.

Which is very simple to achieve, but the "Inconsistent writers" error 
tells me you've not read the documentation, and as you're not showing 
your code, you're not helping us to help you.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
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

Reply via email to