This is the exception stack trace I get if it helps.----------------------------
com.itextpdf.text.DocumentException: 
com.itextpdf.text.exceptions.IllegalPdfSyntaxException: Unbalanced save/restore 
state operators. at com.itextpdf.text.pdf.PdfDocument.add(PdfDocument.java:818) 
at com.itextpdf.text.Document.add(Document.java:278) at 
rpt.WarrantRpt.createReport(WarrantRpt.java:1656) at 
rpt.ReportManager.writeReport(ReportManager.java:286) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597) at 
wcon.ConnectionServlet.process(ConnectionServlet.java:615) at 
wcon.ConnectionServlet.doPost(ConnectionServlet.java:368) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
 at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
 at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
 at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
 at java.lang.Thread.run(Thread.java:619)Caused by: 
com.itextpdf.text.exceptions.IllegalPdfSyntaxException: Unbalanced save/restore 
state operators. at 
com.itextpdf.text.pdf.PdfContentByte.sanityCheck(PdfContentByte.java:4155) at 
com.itextpdf.text.pdf.PdfContentByte.reset(PdfContentByte.java:1794) at 
com.itextpdf.text.pdf.PdfContentByte.reset(PdfContentByte.java:1782) at 
com.itextpdf.text.pdf.PdfWriter.resetContent(PdfWriter.java:747) at 
com.itextpdf.text.pdf.PdfDocument.endPage(PdfDocument.java:1058) at 
com.itextpdf.text.pdf.PdfDocument.newPage(PdfDocument.java:939) at 
com.itextpdf.text.pdf.PdfDocument.addPTable(PdfDocument.java:2729) at 
com.itextpdf.text.pdf.PdfDocument.add(PdfDocument.java:756) ... 18 more
      From: "i...@1t3xt.info" <i...@1t3xt.info>
 To: Post all your questions about iText here 
<itext-questions@lists.sourceforge.net> 
 Sent: Saturday, December 12, 2015 4:57 AM
 Subject: Re: [iText-questions] 
com.lowagie.text.exceptions.IllegalPdfSyntaxException: Unbalanced save/restore 
state operators
   
You are using a version that dates from at least July 2009.
You are experiencing a bug that has been fixed many years ago.
Please upgrade to a recent version of iText if you want to solve your
problem.


On Fri, 11 Dec 2015 06:40:27 -0800 (PST), glennr <gle...@yahoo.com> wrote:
> I am getting the same error when I try to add multiple PdfPTable objects
> to a
> document.
> 
>        doc.add(table1);
>        doc.add(table2);
>        doc.close();
> 
> The thread mentioned doing a cb.saveState() and a cb.restoreState(). 
What
> is "cb"??  Thanks.

------------------------------------------------------------------------------
_______________________________________________
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


 
------------------------------------------------------------------------------
_______________________________________________
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