Paulo,
I hope I haven't offended by sending you the code and pdf's that are causing
my difficulty.
I have reduced the code to the minimum which throws the
NullPointerException, and I am still stuck in the same place.
Do you have time to look at it? Can you suggest a way forward?
Thanks,
John
On 15/01/07, John Pedersen <[EMAIL PROTECTED]> wrote:
Paulo,
I have stripped out the code gives me the NullPointerException, and
attached the class along with the two pdf files I am using as imports.
I haven't been able to reproduce the error with anything simpler - but
there isn't much code!
As I have posted it, the code works fine. But uncomment the five lines:
// writer.close();
// reader = new PdfReader(baos.toByteArray());
// document = new Document(reader.getPageSizeWithRotation (1));
// writer = new PdfCopy(document, baos);
// document.open();
and I get the NullPointerException.
You might wonder why I am closing a writer only to create another. The
problem is that I don't want to build the pdf pages the way I have them - so
I need to close the writer, do some other stuff, then open a new instance of
PDFCopy writer to continue the building.
I hope you can spot the problem!
Thanks very much,
John
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/