When this string
<DIV align=center> <SPAN>abc <SPAN > </SPAN>def </SPAN> </DIV>
is used to create an HtmlFragment it breaks the PDF generation process.
If the spaces after abc and def are removed, generation of t…... @"</font.*?>", ""); text = Regex.Replace(text, @"<font.*?>"... @"</font.*?>", ""); text = Regex.Replace(text, @"<font.*?>"...