I'm using the Aspose PDF for .NET, trying to create a very simple PDF with a TextBox. I have that part working - as it is very simple.
However, I want to change the font of the text in the box, so that when printed, the font is Red (for example).
Here is the code that I think should be working:
// Create a PDF sample PDF file.
var formEditor = new FormEditor("blank.pdf", "result.pdf");
// Create a "style" for the PDF.
formEditor.Facade = new FormFieldFacade();
formEditor.Facade.BackgroundColor = System.Drawing.Color.Yellow;
formEditor.Facade.Font = FontStyle.TimesBold;
formEditor.Facade.TextColor = System.Drawing.Color.Red;
formEditor.Facade.FontSize = 24;
// Add a text box called "FirstName".
formEditor.AddField(FieldType.Text, "FirstName", 1, 100, 800, 260, 780);
formEditor.SetFieldAppearance("FirstName", AnnotationFlags.Print);
// Save the result.
formEditor.Save();
The resultant PDF has the textbox, and the background is Yellow... but the foreground text is not Red, nor is the size 24, nor is the font "TimesBold" - it's as if nothing about the actual font of the text works.
Notice both in the PDF and if I print it...
Am I missing something?