Hi Fabien,
Thanks for your patience.
We have further investigated the issue reported earlier and have found that in order to resolve this issue,
- You should specify border color to make it visible :
textBoxField.Characteristics.Border = System.Drawing.Color.Black;
- To change text color, DefaultAppearance should be specified:
textBoxField.DefaultAppearance.TextColor = System.Drawing.Color.Green;
(this feature will become available with the release of Aspose.Pdf for .NET 7.6.0)
[C#]
Document pdfDocument = new Document(@“c:\temp_output.pdf”);<o:p></o:p>
Page pdfPage = pdfDocument.Pages[1];
Aspose.Pdf.InteractiveFeatures.Forms.TextBoxField textBoxField = new Aspose.Pdf.InteractiveFeatures.Forms.TextBoxField(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(100,
300, 300, 400));
textBoxField.PartialName = "NewField";
pdfDocument.Form.Add(textBoxField, 1);
Border border = new Border(textBoxField);
border.Width = 5;
border.Dash = new Dash(1, 1);
//customer need to add this:
textBoxField.Characteristics.Border =
System.Drawing.Color.Black;
textBoxField.Border = border;
//textBoxField.Color =
Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Green);
textBoxField.DefaultAppearance.TextColor =
System.Drawing.Color.Green;
//textBoxField.DefaultAppearance.FontSize
= 100;
//textBoxField.Value = "20";
pdfDocument.Save("c:/34499-1.pdf");
PS, The above code snippet sets the field border; red border in LifeCycle is shown just to highlight field on the page