Hi All,
Apparently in an open PdfDocument the newPage() command celars up the
relative state PdfContentByte.saveState(). Is this the way it should work?
The scene is as follows:
cb.saveState();
for i = ... {
cb.restoreState();
cb.saveState();
// inserting (eventually many) texts
cb.restoreState();
cb.saveState();
// creating (eventually many) paths
pdfdoc.newPage();
}
cb.restoreState();
Now this works until the first newPage, then it claims 'Unbalanced
save/restore state operators.'
If I insert cb.saveState() after newPage() it works, but I guess that
state is not neccessarily the same I am willing to save.
Should I solve the loop in a different way or is it a bug? I thought
PdfContentByte should preserve its state over the the whole document, but
maybe I am not aware of some underlaying concept.
Thanks in advance!
helasz
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php