mister bean wrote: > In the Javadoc for Document.newPage(), it says iText throws a > DocumentException if newPage() is called on a closed document. My unit tests > cannot reproduce this behavior.
I'll have a look and see if I can reproduce it. > Moreover the source code from Document.java indicates that if the document > is closed, you simply return without throwing any exception. In that case, the documentation is outdated. > listener.newPage(); PdfDocument implements DocListener and can throw an exception. Maybe it's possible to bring PdfDocument in an inconsistent state. For instance by pausing/resuming PdfWriter, and by doing so cause a DocumentException. I'm not sure if what I tell here makes sense, but in such a case, I'd prefer to have a DocumentException tell me what is happening. I'll have a look at it. br, Bruno ------------------------------------------------------------------------- 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 iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/