GemBox Support Forum

Change Field Font

I’m filling in the fields of an existing pdf. How do I Change the font of the field text?

The field font on the fillable pdf is “calibri” But after filling it it is “Hellvetica”

        pdf = PdfDocument.Load(@"C:\MyPdf.pdf");
        pdf.Form.Fields["myField"].Value = "Hello World";

Hi Chad,

Try this:

var field = pdf.Form.Fields["myField"] as PdfTextField;
field.Value = "Hello World";

var appearence = field.Appearance;
appearence.FontFace = new PdfFontFace("Hellvetica");