Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] Graphics2D, JFreeChart and fonts

Adriaan Joubert

2005-06-01

Replies:

Hi,

  I've been using iText and JFreeChart successfully with jdk 1.4.2. I
have now switched to jdk 1.5 and am having big problems with the
translation of fonts: under jdk 1.4.2 all the fonts used for labels etc
are converted to proper pdf fonts and they look great on the screen.

With jdk 1.5 the fonts look very jagged - as if they are very rough
bitmaps. They print ok though, so it may be that they are either high
resolution bitmaps or a custom font is included in the pdf. The size of
a 1-page file with a single graph goes from 33k to 176k.

I tried the same thing with the example from

http://itextdocs.lowagie.com/examples/com/lowagie/examples/directcontent/graphics2D/JFreeChartExample.java

and found exactly the same behaviour: perfect with jdk 1.4.2 and
terrible with jdk 1.5 and a roughly 6-fold increase in the size of the
generated pdfs.


I put a break point in the DefaultFontMapper and it does seem to
translate the fonts correctly.

Does anybody have any idea what is going on?

Thanks,

Adriaan

Attachment: a.joubert.vcf
©2008 junlu.com - Jax Systems, LLC, U.S.A.