You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with PDF documents, you might need to update the text and border colors of a `TextBoxField` and highlight specific fields. This article demonstrates how to customize the appearance of `TextBoxField` elements, including changing their text and border colors.
20
+
When working with PDF documents containing [form fields]({%slug radpdfprocessing-model-interactive-forms-form-fields%}), you might need to update the text and border colors of a [TextBoxField]({%slug radpdfprocessing-model-interactive-forms-form-fields-textboxfield%}) and highlight specific fields. This article demonstrates how to customize the appearance of `TextBoxField` elements, including changing their text and border colors.
To change the text and border colors of a `TextBoxField` in a PDF document, utilize the `TextProperties` and `AppearanceCharacteristics` properties provided by the `VariableContentWidget` class. The following example demonstrates how to customize these aspects.
26
+
To change the text and border colors of a `TextBoxField` in a PDF document, utilize the `TextProperties` and `AppearanceCharacteristics` properties provided by the [VariableContentWidget]({%slug radpdfprocessing-model-annotations-widgets%}) class. The following example demonstrates how to customize these aspects.
25
27
26
-
1. Create a new `RadFixedDocument` and add a page to it.
28
+
1. Create a new [RadFixedDocument]({%slug radpdfprocessing-model-radfixeddocument%}) and add a page to it.
27
29
2. Instantiate a `TextBoxField` and configure its properties as needed.
28
-
3. Add a widget to the `TextBoxField` and set up the text and border colors using the `TextProperties` and `AppearanceCharacteristics` properties.
30
+
3. Add a widget to the `TextBoxField` and set up the text and border colors using the `TextProperties` and [AppearanceCharacteristics]({%slug radpdfprocessing-model-interactive-forms-dynamic-appearance-properties%}) properties.
29
31
4. Recalculate the content of the widget and add the `TextBoxField` to the document.
30
32
5. Save the document to a file.
31
33
@@ -64,10 +66,12 @@ File.WriteAllBytes(fileName, new PdfFormatProvider().Export(fixedDocument, TimeS
64
66
Console.WriteLine("Document with customized TextBoxField created.");
65
67
```
66
68
69
+
The demonstrated approach is applicable not only for creating new documents, but for importing documents that already contains form fields as well.
0 commit comments