I've written an application which uses iText and JFreeChart to generate reports via the web browser. I had developed the application locally on my machine running Java SDK 1.4 and was impressed when the file size was only 30K. However on deployment to a Portal Server running JDK 1.3.1_09 the file size increased 6 times to approximately 167K.
After hours of investigation I found that problem was due to a JFreeChart workaround for a Java Bug.
The TextUtilities class has a workaround for JDC bug ID 431217 for drawing vertical text. The workaround uses the TextLayout class to Render the text instead of the PDFGraphics2D.drawString method, and has the effect of increasing the size of my PDF file from 30k to 167k.
It seems for JDK 1.3.1_09 that we're using you do not need the workaround, so you can turn it off using the following method.
org.jfree.text.TextUtilities.setUseDrawRotatedStringWorkaround(false);
Thanks to Adriaan Joubert for info, saved me from spending any more time!
http://www.mail-archive.com/itext-quest ... 16646.html
Jason.
p.s Thanks for all you work David et al, JFreeChart is a wonderful example of well designed code, and has made my life easier.
