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
I want to set the text color in a cell but cannot find an option for this in `TextProperties`. The only visible option is `HighlightColor`.
21
+
Learn how to change the forecolor (e.g. red color) for a text block.
22
22
23
-
This knowledge base article also answers the following questions:
24
-
- How to change the text color in PdfProcessing cells?
25
-
- How to use FillColor to set cell text color in Telerik Document Processing?
26
-
- What is the method to apply custom text color in RadPdfProcessing blocks?
23
+

27
24
28
25
## Solution
29
26
30
-
To set the text color in a cell, use the `FillColor` property of `GraphicProperties`. This property determines the color used for rendering content elements of a block. To apply the change only to specific text, use the `SaveGraphicProperties()` and `RestoreGraphicProperties()` methods. These methods allow you to apply a temporary change and revert to the previous settings.
31
-
32
-
Follow the steps below:
33
-
34
-
1. Create a new `RadFixedDocument` and add a page.
35
-
2. Initialize a `FixedContentEditor` for the page.
36
-
3. Create a `Block` and call `SaveGraphicProperties()` to save the current settings.
37
-
4. Assign a color to `GraphicProperties.FillColor`.
38
-
5. Insert the text that needs the custom color.
39
-
6. Call `RestoreGraphicProperties()` to revert to the previous settings.
40
-
7. Continue adding text or elements to the block.
41
-
8. Export the document using `PdfFormatProvider`.
27
+
To set the fore color in a text block, use the `FillColor` property of `GraphicProperties`. This property determines the color used for rendering content elements of a block. To apply the change only to specific text, use the `SaveGraphicProperties()` and `RestoreGraphicProperties()` methods. These methods allow you to apply a temporary change and revert to the previous settings.
-[Text and Graphic Properties in PdfProcessing](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/editing/text-and-graphic-properties)
83
-
-[Block Class Documentation](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/editing/block)
0 commit comments