Hi Aspose-Team,
i have the following issue while creating pdf-file via binding xml with xslt. My problem is that the tags are not displaying correctly.
Here are some code snippets for you to understand what i’m doing not right:
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version=“1.0” xmlns:xsl=“XSLT Namespace”>
<xsl:attribute-set name=“PureHtml”>
<xsl:attribute name=“FontName”>Tahoma</xsl:attribute>
<xsl:attribute name=“FontSize”>10</xsl:attribute>
<xsl:attribute name=“IsHtmlTagSupported”>true</xsl:attribute>
<xsl:attribute name=“UseTextInfoStyle”>true</xsl:attribute>
</xsl:attribute-set>
<xsl:template name=“Main” match=“node()”>
<xsl:value-of select=“HtmlString”/>
</xsl:template>
</xsl:stylesheet>
HtmlString: “Some bold text”.
Binding snippet is pretty common:
Pdf pdf = new Pdf();
pdf.BindXML(xml, xslt);
byte[] pdfFile;
using (MemoryStream memStream = new MemoryStream())
{
pdf.Save(memStream);
memStream.Position = 0;
pdfFile = memStream.ToArray();
}
return pdfFile;
It also does’t work with tag.
What am i doing wrong? I’m using Apose.Pdf 9.3. I also tried 9.6 and still no luck.
Thank you very much for your help and hints.
Best regards
Alex
Hi Alex,
Hi Tilal,
thank you very much for a quick response.
I also noticed that this issue is gone if your text snippet surrounded with
tag. Replacing Some bold text with
Some bold text
displays text in a corret format. But it causes other issues.Best regards
Alex
Hi Alex,