ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Making Header font to be bold in ITextSharp using VB.Net<blockquote><cite>PSowmiya says:</cite> <div class="line number1 index0 alt2"><code class="vb keyword">Dim</code> <code class="vb plain">bf </code><code class="vb keyword">As</code> <code class="vb plain">itextsharp.text.pdf.BaseFont = itextsharp.text.pdf.BaseFont.CreateFont(</code><code class="vb string">""</code><code class="vb plain">, itextsharp.text.pdf.BaseFont.CP1252, itextsharp.text.pdf.BaseFont.EMBEDDED)</code></div> <div class="line number2 index1 alt1"><code class="vb keyword">Dim</code> <code class="vb plain">Font </code><code class="vb keyword">As</code> <code class="vb plain">itextsharp.text.Font = </code><code class="vb keyword">New</code> <code class="vb plain">itextsharp.text.Font(bf, 10)</code></div> <div class="line number3 index2 alt2"><code class="vb keyword">Dim</code> <code class="vb plain">cell </code><code class="vb keyword">As</code> <code class="vb keyword">New</code> <code class="vb plain">PdfPCell(</code><code class="vb keyword">New</code> <code class="vb plain">Phrase(column.HeaderText, Font))</code></div> </blockquote> <p>Change above code with below.</p> <pre class="brush: vb">Dim bf As BaseFont = BaseFont.CreateFont(&#34;c:/windows/fonts/HARLOWSI.ttf&#34;, BaseFont.CP1252, BaseFont.EMBEDDED) Dim Font As Font = New Font(bf, 10, Font.BOLD) Dim cell As New PdfPCell(New Phrase(column.HeaderText, Font))</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/405178/Making-Header-font-to-be-bold-in-ITextSharp-using-VBNet/https://www.aspforums.net:443/Threads/405178/Making-Header-font-to-be-bold-in-ITextSharp-using-VBNet/Sun, 04 Nov 2018 23:12:20 GMT