2

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

Piotrek
  • 169
  • 3
  • 17
Sandip Shinde
  • 31
  • 1
  • 5
  • iText supports writing systems that are different from the Western left-to-right writing system eg like Arabic, Indic but only if you include the pdfCalligraph add-on. – jazb Oct 29 '21 at 06:55
  • How is your font `f_cn` generated, which encoding did you select? – mkl Oct 29 '21 at 08:20
  • 1
    @Jazb *"iText supports writing systems that are different from the Western left-to-right writing system eg like Arabic, Indic but only if you include the pdfCalligraph add-on."* - The OP mentioned iText version 5.5.13.2; the pdfCaligraph add-on is for iText 7.x. – mkl Oct 29 '21 at 08:21

1 Answers1

1

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);
Piotrek
  • 169
  • 3
  • 17