Hi I created a program using IText and having strange beavior
I'm trying to create documents in Arabic and I managed to do that using IText but I want to make the document without having to embed the font file in the document.
The problem is that When I write in Arabic it takes much more file size than when I make it in english
I found that the problem is in the encoding of the text that I'm using. which is IDENTITY_H but if I cahnge the encoding the Arabic will be corrupted or will not be displayed
Here is the code I'm using to create the font
Code:
BaseFont baseFont = null;
try {
baseFont = BaseFont.createFont(fontFileName, BaseFont.IDENTITY_H, true);
} catch (Exception e) {
e.printStackTrace();
}
Font arabicFont = new Font(baseFont, size);
arabicFont.setColor(color);
arabicFont.setStyle(style);
return arabicFont;
The sytle I'm using is Bold and the size is 12
when I change the size of the font The size of the generated document does not change which is logical but when I change the font style from bold to normal it reduces a little bit.
Another thing in this code is that when I change the embeded flag to true the size does not change at all hich means that the font was not embeded.
This is getting me very confused
