For a text box object, I would like to change the style to bold. I already created the arial font as it is not the default font for the BaseFont object. Apparently, the TextField object accepts only BaseFont as a valid font. I was wondering how to change the font style that I assigned to my text box in bold. Is there any way to do this? here is my code i still
TextField txtNewField = new TextField(stamp.Writer, new Rectangle(1, 1, 75, 25), "TxtField");
BaseFont arial = BaseFont.CreateFont(@"c:\windows\fonts\arial.ttf", BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
txtNewField.FontSize = 8;
txtNewField.Font = arial;
Thank you in advance!
source
share