How do I retrieve the font information of a TextBoxField? Such as the font type, font family, font size, and font weight.
Thanks,
Diane Asberry
How do I retrieve the font information of a TextBoxField? Such as the font type, font family, font size, and font weight.
Thanks,
Diane Asberry
Hi Diane,
Document pdf = new
Document(“input.pdf”);<o:p></o:p>
var pdfForm = new Aspose.Pdf.Facades.Form(pdf);
foreach (Field formField in pdf.Form)
{
var fieldFullName = formField.FullName;
var facadeField = pdfForm.GetFieldFacade(fieldFullName);
var fieldType = pdfForm.GetFieldType(fieldFullName);
Console.WriteLine("field FullName: {0},fieldType:{1}, Font :{2}, FontSize: {3}, CustomFont: {4}",
fieldFullName,
fieldType,
facadeField.Font,
facadeField.FontSize,
facadeField.CustomFont);
}
Console.ReadLine();
Please feel free to contact us for any further assistance.
Best Regards,
Hi Diane,