alrts wrote: > Paolo, > > the code is huge and difficult to supply. In the meantime, I could generate > the same error at the ContentByte level. Here it is obvious that something > strange is going on: > > document = new Document(); > document.Open(); > writer = PdfWriter.GetInstance(document, pdfFile);
It would be very strange if this worked. You're opening the document before creating the writer. I don't think this is your code sample. > I switched back to 3.1.1 and get no error. Maybe not, but your PDF has an error. The "Unbalanced begin/end text" exception makes sure you don't create PDFs with that error. > Please help! You need an EndText() for every BeginText(), and vice-versa. Somewhere in your code, you have a BeginText() but EndText() is never reached. Or you have an EndText(), but there wasn't a BeginText() to begin with. You CAN NOT reproduce that error with your code snippet. Try this example: http://kuujinbo.info/iTextInAction2Ed/index.aspx?ch_key=Chapter03&cl_key=FestivalOpening Does it work? ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/