Skip to content

Commit

Permalink
applied Yoan's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dessyordanova committed Jan 30, 2025
1 parent 4317f63 commit 4bf35e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions knowledge-base/change-block-text-color-in-pdf-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ ticketid: 1674934

## Description

When working with PDF documents using [RadPdfProcessing]({%slug radpdfprocessing-overview%}), you may need to change the foreground color of text inside a table to differentiate between various pieces of information, such as an account number and its value. This knowledge base article also answers the following questions:
When working with PDF documents using [RadPdfProcessing]({%slug radpdfprocessing-overview%}), you may need to change the foreground color of the text inside a table to differentiate between various pieces of information, such as an account number and its value. This knowledge base article also answers the following questions:
- How to change the text color within a PDF table using RadPdfProcessing?
- How to differentiate text elements in a PDF document by color?
- How to apply foreground colors to text blocks within a PDF table?
- How to apply foreground colors to the text of Blocks within a PDF table?

## Solution

To change the text color inside a table in a PDF document using RadPdfProcessing, use the **FillColor** property of [GraphicProperties]({%slug radpdfprocessing-editing-text-and-graphic-properties%}). This property controls the color used for drawing the content elements of a `Block`. You can temporarily change the graphic properties for specific text elements by using the `SaveGraphicProperties()` and `RestoreGraphicProperties()` methods. This allows you to apply different colors to different parts of the text inside a table cell.
To change the text color inside a table in a PDF document using RadPdfProcessing, use the **FillColor** property of [GraphicProperties]({%slug radpdfprocessing-editing-text-and-graphic-properties%}). This property controls the color used for drawing the content elements of a `Block`. You can temporarily change the graphic properties for specific text elements by using the `SaveGraphicProperties()` and `RestoreGraphicProperties()` methods. This allows you to apply different colors, at different stages, to different parts of the text inside a table cell.

Here's how to achieve this:

1. Create a [table]({%slug radpdfprocessing-editing-table%}) and add a [row]({%slug radpdfprocessing-editing-tablerow%}) and a [cell]({%slug radpdfprocessing-editing-tablecell%}) to it.
2. Add a [block]({%slug radpdfprocessing-editing-block%}) to the cell for the text you want to display.
1. Create a [Table]({%slug radpdfprocessing-editing-table%}) and add a [Row]({%slug radpdfprocessing-editing-tablerow%}) and a [Cell]({%slug radpdfprocessing-editing-tablecell%}) to it.
2. Add a [Block]({%slug radpdfprocessing-editing-block%}) to the cell for the text you want to display.
3. Use `SaveGraphicProperties()` to save the current graphic state.
4. Set the [FillColor]({%slug radpdfprocessing-concepts-colors-and-color-spaces%}) property of [GraphicProperties]({%slug radpdfprocessing-editing-text-and-graphic-properties%}) to the desired color.
5. Insert the text into the block.
Expand Down

0 comments on commit 4bf35e7

Please sign in to comment.