[iText-questions] Re: [iText-questions] Problem with PdfContentByte.addTemplate()

2005-12-09 Thread Eric Anderson
Changing PdfContentByte dc = stamper.getWriter().getDirectContent(); to PdfContentByte dc = stamper.getUnderContent(1); Brought all the objects over (thanks!) except for the image that was in reader1... any clue as to why? Does PdfImportedPage include images? Thanks! >>> Bruno Lowagie <[EMAIL

Re: [iText-questions] Problem with PdfContentByte.addTemplate()

2005-12-09 Thread Bruno Lowagie
Eric Anderson wrote: 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)

Re: [iText-questions] Problem with PdfContentByte.addTemplate()

2005-12-09 Thread Eric Anderson
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

Re: [iText-questions] Problem with PdfContentByte.addTemplate()

2005-12-09 Thread Bruno Lowagie
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

Re: [iText-questions] Problem with PdfContentByte.addTemplate()

2005-12-09 Thread Eric Anderson
Thanks for your quick reply... changing the class to the PdfStamper in the following code gives me this error now... //Read the two files and merge. PdfReader reader1 = new PdfReader( pdfStream1.toByteArray() ); PdfR

Re: [iText-questions] Problem with PdfContentByte.addTemplate()

2005-12-09 Thread Bruno Lowagie
Eric Anderson wrote: I am trying to put one document on top of another... But can't seem to do it. Using the following code I get the below error. Anyone know why? You have the wrong class. CopyFields can't be used to superimpose pages; use PdfStamper instead. br, Bruno

[iText-questions] Problem with PdfContentByte.addTemplate()

2005-12-09 Thread Eric Anderson
I am trying to put one document on top of another... But can't seem to do it. Using the following code I get the below error. Anyone know why? //Read the two files and merge. PdfCopyFields copy = new PdfCopyFields( out ); PdfReader reader1 = new PdfReader( pdfStream1.to