Oomph Fortuity
Oomph Fortuity

Reputation: 6118

IText Unicode Indic characters are not diplayed Properly

I am using Itext for PDF Generation. I have Text In Marathi. but Itext is generation that text without Glyph Substitution.

For Example :

Text Should Be : ल्ल

But iText Showing in PDF : लल .

Same as Text should be : क्ष्म

But iText Showing in PDF : कष

I have using windows Sytem file for font .e. arial unicode font. And Code is

BaseFont base=BaseFont.createFont("c:/windows/fonts/ARIALUNI.ttf",BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

i am using itext Version itext-5.4.3.jar.

Please give me solution.In what way i should procceed. Thank you

Upvotes: 2

Views: 1509

Answers (2)

Oomph Fortuity
Oomph Fortuity

Reputation: 6118

I got Solution... The solution is That IText currently not support (as per my searching) Indic languages such as Marathi. It's language parser is yet not completely mature for indic Language. As it is open source,i was using it.

Now,I have moved to Apache FOP 1.1. It support indic Languages.But important con is that it is resource intensive.In other word, it is slower than IText.

Thank You...

Upvotes: 1

Vignesh Vino
Vignesh Vino

Reputation: 1238

You need to add unicode with your string when you're passing as input.The unicode for bangla or Hindi is

\u0986\u09ae\u09bf \u0995\u09cb\u09a8 \u09aa\u09a5\u09c7
      \u0995\u09cd\u09b7\u09c0\u09b0\u09c7\u09b0 \u09b7\u09a8\u09cd\u09a1
      \u09aa\u09c1\u09a4\u09c1\u09b2 \u09b0\u09c1\u09aa\u09cb
      \u0997\u0999\u09cd\u0997\u09be \u098b\u09b7\u09bf

Here is the Example

Upvotes: 3

Related Questions