I am developing an application to export html data to pdf file (in c#). I followed these steps to convert the data
StyleSheet styles = new StyleSheet();
tempText = tempText.Replace("\"", """);
ArrayList objects = HTMLWorker.ParseToList(new StringReader(tempText), styles);
for (int k = 0; k < objects.Count; k++)
{
document.Add((iTextSharp.text.IElement)objects[k]);
}
lets suppose if my text is something like
<h3 style="color:blue;">
Write a Java
<span style="font-size:16px;">
<span style="background-color:yellow;">
program that prints two separate text
</span>
</span>
strings on the same line.
![ exported data in pdf is shown in the image below ][1]</h3>
The problem is that the conversion failed for the inner span tag. It does not parse background-color
from style. How can I do this? I don't want to use any third party tool.