Is itextsharp and arabic in nature?

I have itextsharp to convert html to pdf (using asp.net C #) and it works in English, but when I want to convert html, including Arabic characters, it will give me an empty pdf!

Can someone help me?

+3
source share
1 answer

The problem is that your font does not have glyphs for Arabic code points. You need to embed the font with Arabic glyphs such as arabtype.ttf.

string fontpath = Environment.GetEnvironmentVariable( "SystemRoot" ) + "\\fonts\\arabtype.ttf";
BaseFont basefont = BaseFont.CreateFont( fontpath, BaseFont.IDENTITY_H, BaseFont.EMBEDDED );
Font arabicFont = new Font( basefont, 10f, Font.NORMAL );
0
source

Source: https://habr.com/ru/post/1737571/


All Articles