Problem adding charts (JFreeChart) to Pdf (iText)
<p>When I add 1 chart to the document there is no problem</p>

<p>When I add the second chart I get this error ...</p>

<p>Exception in thread "main" com.itextpdf.text.exceptions.IllegalPdfSyntaxException: Unbalanced save/restore state operators.</p>

<pre><code>chart1 = SpecialJFreeChartBuilder.createChart1(
                "Site and Number of Requests ", results);

        document.newPage();

        PdfContentByte Add_Chart_Content = writer.getDirectContent();
        PdfTemplate template_Chart_Holder = Add_Chart_Content
                .createTemplate(width, height);
        Graphics2D Graphics_Chart = template_Chart_Holder.createGraphics(
                width, height, new DefaultFontMapper());
        Rectangle2D Chart_Region = new Rectangle2D.Double(0, 0, 540, 380);
        chart1.draw(Graphics_Chart, Chart_Region);
        Graphics_Chart.dispose();
        Add_Chart_Content.addTemplate(template_Chart_Holder, 0, 0);

        chart2 = SpecialJFreeChartBuilder.createChart2(
                "Site and totalAmount ", results);

        document.newPage();

        PdfContentByte Add_Chart_Content1 = writer.getDirectContent();
        PdfTemplate template_Chart_Holder1 = Add_Chart_Content1
                .createTemplate(width, height);
        Graphics2D Graphics_Chart1 = template_Chart_Holder1.createGraphics(
                width, height, new DefaultFontMapper());
        Rectangle2D Chart_Region1 = new Rectangle2D.Double(0, 0, 540, 380);
        chart2.draw(Graphics_Chart1, Chart_Region1);
        Graphics_Chart.dispose();
        Add_Chart_Content.addTemplate(template_Chart_Holder1, 0, 0);
</code></pre>

<p>....
                document.close();</p>

<p>Can anyone help me ....</p>
