1
Answer

pdf font problem

Ask a question
C#, visualstudio 2015, desktop application. I have a text box font type is SutonnyMJ, MS Access database font type is Calibri, datagridview is converted Calibri to SutonnyMJ. When I use iTextsharp pdf maker then font problem arises. Please help me.
 
iTextSharp.text.Font fontTable = FontFactory.GetFont("SutonnyMJ", 10, iTextSharp.text.Font.NORMAL, BaseColor.BLACK); 
 
foreach (DataGridViewRow row in dataGridView1AP.Rows)
{
foreach (DataGridViewCell cell in row.Cells)
{
pdfTable.AddCell(new PdfPCell(new Phrase(cell.Value.ToString(), fontTable)) { Border = PdfPCell.BOTTOM_BORDER, Padding = 5, MinimumHeight = 30, PaddingTop = 5 });
}
}
 

Answers (1)