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
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)
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
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
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
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
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