When I am trying to generate PDF from HTML, some Turkish characters like ĞÜŞİÖÇ ğüşıöç are missing in PDF, I see a space in place of these characte
Same my problem solved this code;
var pathUpload = Server.MapPath($"~/Test.pdf");
using (var fs = System.IO.File.Create(pathUpload))
{
using (var doc = new Document(PageSize.A4, 0f, 0f, 10f, 10f))
{
using (var writer = PdfWriter.GetInstance(doc, fs))
{
doc.Open();
BaseFont baseFont = BaseFont.CreateFont("C:\\Windows\\Fonts\\Arial.ttf", "windows-1254", true);
Font fontNormal = new Font(baseFont, 24, Font.NORMAL);
var p = new Paragraph("Test paragrapgh İÇşıĞğŞçöÖ", fontNormal);
doc.Add(p);
doc.Close();
}
} }