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…...Replace("\r", “”); text = text.Replace("\n", " “);...“); text = text.Replace(”¿", “”); //remove XML tags if any text...