itextsharp 5.5.13.2 problem showing hungrerian and Polish language

220 Views Asked by At

While showing the report some character are not displaying on PDF

case "HU"://Hungearian
     writeText(cb, **"Vevői cselekvési jelentés",** 210, 793, f_cn, 16);
                            

private void writeText(PdfContentByte cb, string Text, int X, int Y, BaseFont font, int Size)
{
    cb.SetFontAndSize(font, Size);
    cb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, Text, X, Y, 0);
}

it shows "Vevi cselekvési jelentés" for first line

1

There are 1 best solutions below

0
Piotrek On

You need to use font based on proper code page. For us (greetings from Poland ;) ) CP-1250 does the trick.

Try something like:

var font = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1250, false);