Hello,
I am using iText for generating PDF output. I have a requirement where
i need to draw a chart in PDF output.
For drawing chart, I have the following code snippet.
PdfTemplate tp = contentByte.createTemplate(chartWidth,
chartHeight); //create graphics java.awt.Graphics2D g2d =
tp.createGraphicsShapes(chartWidth, chartHeight);
Here, the method createGraphicsShapes() returns the graphics instance of
com.lowagie.text.pdf.PdfGraphics2D. Now on the same instance, I am calling the
method fillArc() to draw chart.
Where in other case, for drawing chart I am directly using the
graphics instance of sun.java2d.SunGraphics2D. And same as in case of PDF, on
the graphics instance I am invoking method fillArc().
Here I am facing the performance issue while using the graphics instance of
com.lowagie.text.pdf.PdfGraphics2D for drawing chart.
The fillArc() method overridden for PDFGraphics2D takes average 215
milliseconds to execute for my chart data. In against to this, while using
sun.java2d.SunGraphics2D for drawing chart, the fillArc() method is executed
within 15 milliseconds for the same chart data.
This time difference is too vast, and inturn charts in PDF output takes
lot of time to draw. So can anyone tell me the reason behind this? or its
better if anyone can suggest me the alternative solution for this.
Any help will be appriciated. And Thanks in advance.
Thanks & Regards,
Mihir Brahmbhatt.
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
http://in.yahoo.com/------------------------------------------------------------------------------
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/