I try to create a PDF file with iTextSharp version 5.5.9.0 (I added from NuGet). All works fine but not and Romanian diacritics (ȘșȚțăĂÂâ). I read a lot of articles with solutions about that but nothing work. Now I founded a solution that from all diacritics appear only "ăĂÂâ" others not appear. That is my code:
Dim bf As BaseFont = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1250, False)
Dim normalFont As New iTextSharp.text.Font(bf, 9, Font.NORMAL)
Dim par As New Paragraph("ȘșȚțăĂÂâ", normalFont)
pdfDoc.Add(par)
Can anybody write me what encoding I must write to have all Romanian diacritics.
Solution: from "Paulo Soares" is right. I made only some correction. I downloaded one font that support Romanian language from this site: https://www.fontsquirrel.com/fonts/list/language/romanian/ than I loaded it on myBaseFont with encoding BaseFont.IDENTITY_H Here is the code:
Dim ttfPath As String = "C:\Test\DejaVuSerif.ttf" 'Path to font file
Dim bf As BaseFont = BaseFont.CreateFont(ttfPath, BaseFont.IDENTITY_H, False)
Dim normalFont As New iTextSharp.text.Font(bf, 9, iTextSharp.text.Font.NORMAL)