Forums - C# Corner

Forum guidelines
Shovan Saha

Shovan Saha

  • 1.3k
  • 196
  • 10.1k

pdf font problem

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