On 6/04/2012 7:13, Yadhagiri Chilukuri wrote:

HI ,

I got this exception what are the situation came this exception :

com.lowagie.text.exceptions.IllegalPdfSyntaxException: Unbalanced save/restore state operators

give me sugetion how to debug *itext* code when the have face this type of exceptions

I searched In but not find suitable answer.

Search not further, just read the error message: you have unbalanced save/restore state operators. In other words, somewhere you have used the method saveState() without using restoreState().
Or you have used restoreState() without using saveState().
Or maybe you have something like:

cb.saveState();
document.newPage();
cb.restoreState();

In older versions of iText, we allowed developers to write PDF syntax any which way they want. Unfortunately, when you give this power to developers who didn't read and understand ISO-32000-1 (the standard you've probably read whilst searching for a suitable answer), you end up with PDFs that are corrupt. That's why we took away a little bit of that power. In order to make iText more "fool-proof", we now throw an exception when a developer doesn't respect the q/Q-rule.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to