I'm using Fonet to render XSL to PDF.
In my .xslt I have:
<xsl:value-of select="Text" disable-output-escaping="yes"/>
In my C# I have the method to crate the PDF memory stream from the XML memory stream:
private static MemoryStream Xml2Pdf(MemoryStream msTransform)
{
FonetDriver d = FonetDriver.Make();
msTransform.Position = 0;
MemoryStream msOut = new MemoryStream();
d.Render(msTransform, msOut);
return msOut;
}
The value of Text is:
<h2><strong><span style="color:#0e8a16;">Text 1</span></strong></h2><h2 style="text-align:center"><em><span style="color:#fef2c0;"><span style="background-color:#0052cc;">Text 2</span></span></em></h2><h4 style="text-align:right"><u>Text 3</u></h4>
d.Render throws System.SystemException: Unknown formatting object ^h2
If I use a Text without HTML everything works fine.
And I don't have any clue how to fix it