On my previous post I missed 1 important line of code. Here is the complete code

                        document.open();

                        PdfContentByte contentByte = writer.getDirectContent();
                         
                        PdfTemplate template = 
contentByte.createTemplate(width, height);
                        
                        Graphics2D graphics2d = template.createGraphics(width, 
height, new
DefaultFontMapper());
                        
                        Rectangle2D rectangle2d = new Rectangle2D.Double(left, 
top, width, height);
                        
                        chart.draw(graphics2d, rectangle2d);
                        
                        graphics2d.dispose();
                        
                        contentByte.addTemplate(template, left, 
writer.getVerticalPosition(true) -
height);

                        document.add((Element) contentByte);
                        document.close();

No matter how much i resize the chart, it always comes out to the PDF with one
border of the chart missing.
Temporarily I have to set the chart border visible to false but
I hope to find the correct answer here from readers.

Thanks,
Don



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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/

Reply via email to