title: Change Text style in itextsharp
body: <p>I want to make the font bold using itextsharp. below is my code</p>
  
  <pre><code>foreach (DataGridViewColumn column in dataGridView1.Columns)
  {
        iTextSharp.text.pdf.BaseFont bf = iTextSharp.text.pdf.BaseFont.CreateFont(iTextSharp.text.pdf.BaseFont.TIMES_ROMAN, iTextSharp.text.pdf.BaseFont.CP1252, iTextSharp.text.pdf.BaseFont.EMBEDDED);
  
        //  iTextSharp.text.Font font1 = new iTextSharp.text.Font("iTextSharp.text.Font", 10, Font.Bold);
        //FontFactory.GetFont("TIMES_ROMAN", 10, Font.Bold);
  
        iTextSharp.text.Font font = new iTextSharp.text.Font(bf, 10);
        //iTextSharp.text.Font font = new iTextSharp.text.Font(9); 
        PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText, font));
        cell.BackgroundColor = new iTextSharp.text.Color(240, 240, 240);                                  
        pdfTable.AddCell(cell);
  }
  </code></pre>