Hi all,

I use iText to generate a document with chapters.
The difference in that I use a bigger font for chapter names.
This is the code that generated the error :

        document.add(Chunk.NEWLINE);
        String text = "VIII. Domeniul in care s-au produs evenimente:";
        Paragraph p = new Paragraph(new Chunk(text, chapterFont));
        document.add(p);
        document.add(Chunk.NEWLINE);

...... some more code here that doesn't change the document ............

        document.add(Chunk.NEWLINE);
        String text = "IX. Judetul in care au avut loc principalele
operatiuni :";
        Paragraph p = new Paragraph(new Chunk(text, chapterFont));
        document.add(p); - here is where the exception is thrown
        document.add(Chunk.NEWLINE);

The exception is :

com.itextpdf.text.DocumentException:
com.itextpdf.text.exceptions.IllegalPdfSyntaxException: No message found for
unbalanced.save.restore.state.operators

Does anybody has any idea why this happens ?
This code used to work when I was using an older version of iText.

Thanks,
NArcis
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
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
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to