1
Reply

pdf font problem

Shovan Saha

Shovan Saha

Aug 25 2017 10:39 AM
250
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)