Background color of Text fragment

Good morning,

I am facing the following issue :
I would like to retrieve the background color of a text fragment. Here is my code :

Color backgroundColor = textFragment.TextState.BackgroundColor;
_logger.Debug($"Background color : {backgroundColor} of {textFragment.Text}");

For this example :
image.png (11,8 Ko)

The result is null, but should return the “yellow” color.
Can you tell me what is the correct way to retrieve the background color, please ?

Thank you very much :slight_smile:

@BlackSea

Can you please share the sample PDF as well with us? We will test the scenario in our environment and address it accordingly.