Hi,
In Aspose.Pdf, when adding several Segments to a Text object that has the property IsHtmlTagSupported sets to true, only the first segment is rendered in the pdf.
Using the sample code below, I’ve been able to reproduce this behaviour with Aspose.Pdf 5.4 and 6.0
static void Main(string[] args)
{
Pdf pdf = new Pdf();
Section section = pdf.Sections.Add();<span style="color:green;">// Don't work, prints only "Hello"</span> <span style="color:#2b91af;">Text</span> text1 = <span style="color:blue;">new</span> <span style="color:#2b91af;">Text</span>(); text1.IsHtmlTagSupported = <span style="color:blue;">true</span>; text1.Segments.Add(<span style="color:#a31515;">"Hello"</span>); text1.Segments.Add(<span style="color:#a31515;">" world!"</span>); section.Paragraphs.Add(text1); <span style="color:green;">// Works, prints "Hello world!"</span> <span style="color:#2b91af;">Text</span> text2 = <span style="color:blue;">new</span> <span style="color:#2b91af;">Text</span>(); text2.IsHtmlTagSupported = <span style="color:blue;">false</span>; text2.Segments.Add(<span style="color:#a31515;">"Hello"</span>); text2.Segments.Add(<span style="color:#a31515;">" world!"</span>); section.Paragraphs.Add(text2); <span style="color:green;">// Works, prints "Hello world!"</span> <span style="color:#2b91af;">Text</span> text3 = <span style="color:blue;">new</span> <span style="color:#2b91af;">Text</span>(); text3.IsHtmlTagSupported = <span style="color:blue;">true</span>; text3.Segments.Add(<span style="color:#a31515;">"Hello world!"</span>); section.Paragraphs.Add(text3); <span style="color:blue;">using</span> (<span style="color:#2b91af;">Stream</span> s = <span style="color:blue;">new</span> <span style="color:#2b91af;">FileStream</span>(<span style="color:#a31515;">@"c:\temp\test.pdf"</span>, <span style="color:#2b91af;">FileMode</span>.OpenOrCreate, <span style="color:#2b91af;">FileAccess</span>.ReadWrite)) { pdf.Save(s); } }</pre><pre style="font-family:Consolas;font-size:13;color:black;background:white;"><br></pre><pre style="font-family:Consolas;font-size:13;color:black;background:white;">Any idea ? Am I doing something wrong ?</pre><pre style="font-family:Consolas;font-size:13;color:black;background:white;">Thanks</pre></div>