I am implementing some print functionality in C#
Before actual printing I show the contents in PDF form-
There are some RTF contents which I want to display on PDF which is working well except the RTF with highlighted text (having background color)
ex - ![enter image description here](https://i.stack.imgur.com/NjkHy.png)
But when I display this on PDF, it looks like ![enter image description here](https://i.stack.imgur.com/783cl.png)
I get the HTML as follows
<span style="background-color: rgb(255, 255, 0);">Some highlighted text</span><br>
Which I am converting to RTF using following function
public string ConvertToRtf(this string htmlString)
{
var htmlToRtf = new SautinSoft.HtmlToRtf();
htmlToRtf.Serial = "10034959528";
return htmlToRtf.ConvertString(htmlString);
}
If I do not convert it to RTF, it sreightforwad display it like <span style="background-color: rgb(255, 255, 0);">Some highlighted text</span><br>
Please tell me how can I display it accurately in pdf