I'm working with itextsharp and I've been looking for and testing the subject of bold for several weeks.
I've tried with this code, for example:
Font verdanaBold = FontFactory.GetFont("Verdana", 7f, Font.BOLD);
He tells me that a using
is missing, but I have a post:
using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.text.pdf.fonts;
After with:
documento.Add(new Paragraph("TITULO 1",Text.BOLD);
And it did not work either.
I put a part of the code:
//CARACTERISTICAS CLIENTE
var MyFont1 = FontFactory.GetFont("Times New Roman", 18);
//CARACTERISTICAS EMPRESA
var FontColour = new BaseColor(255, 0, 0);
var MyFont = FontFactory.GetFont("Times New Roman", 11, FontColour, Font.BOLD);
A parafo:
Paragraph p2 = new Paragraph(" " + tb_direccion.Text + " ", MyFont1);
p2.Alignment = Element.ALIGN_CENTER;
doc.Add(p2);
Any suggestions to add bold?