Changed the line
PdfImportedPage page = stamper.getWriter().getImportedPage(reader1, 1);
to
PdfImportedPage page = stamper.getImportedPage(reader1, 1);

same result..


java.lang.NullPointerException
        at com.lowagie.text.pdf.PdfContentByte.addTemplate(Unknown Source)
        at com.lowagie.text.pdf.PdfContentByte.addTemplate(Unknown Source)
Building...
Reader1 has 1 pages. Reader2 has 2 pages.
Done!


I don't understand where the null is...as the Imported Page is not null and 
there is no direct reference to the source line.


>>> Bruno Lowagie <[EMAIL PROTECTED]> 12/9/2005 9:54 am >>>
Eric Anderson wrote:

>Thanks for your quick reply... changing the class to the PdfStamper in the 
>following code gives me this error now...
>  
>
This is certainly wrong:

>               PdfImportedPage page = 
> stamper.getWriter().getImportedPage(reader1, 1);
>
It should be

PdfImportedPage page = stamper.getImportedPage(reader1, 1);

(Just something I noticed at first sight, I don't know if it will fix 
the problem)
br,
Bruno



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to