title: Aspose PDF - How Do I Specify a Font of a TextBox
body: <p>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.</p>
  
  <p>However, I want to change the font of the text in the box, so that when printed, the font is Red (for example).</p>
  
  <p>Here is the code that I <em>think</em> should be working:</p>
  
  <pre><code>// 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();
  </code></pre>
  
  <p>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 <em>nothing</em> about the actual font of the text works.</p>
  
  <p>Notice both in the PDF and if I print it...</p>
  
  <p><img src="https://i.stack.imgur.com/kz9i8.png" alt="PDF with Yellow TextBox but no Red Font"></p>
  
  <p><img src="https://i.stack.imgur.com/EFmaU.png" alt="PDF with Yellow TextBox but no Red Font printed as an XPS file"></p>
  
  <p>Am I missing something?</p>