Free Support Forum -

HTML <span> element causes linebreak

when adding html to paragraph i am finding that is forcing the text to break on to a new line.
i have put below the smallest code block that demonstrates the problem
I have checked in IE, Firefox and Chrome and none of these browsers would introduce a line break.

I am evaluating a number of pdf libraries and so far aspose.pdf is providing the best functionality in terms of html formatting, but this is a deal breaker.
I know that you cant give definitive timescales on fix, but any feedback would be really useful

 'Instantiate a pdf document
Dim pdf1 As Aspose.Pdf.Generator.Pdf = New Aspose.Pdf.Generator.Pdf()

    <span style="color:green;">'Create a section in the pdf document</span>
    <span style="color:blue;">Dim</span> sec1 <span style="color:blue;">As</span> Aspose.Pdf.Generator.<span style="color:#2b91af;">Section</span> = pdf1.Sections.Add()

    <span style="color:green;">'define the html</span>
    <span style="color:blue;">Dim</span> string1 <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:#a31515;">"<p> Here is some normal Text. <span style=""color:#ff8c00;"">orange font.</span> <span style=""background-color:#ff8c00;"">orange background.</span> This should all be in the same paragraph.</p>"</span>

    <span style="color:green;">'add the formatted text to the document</span>
    <span style="color:blue;">Dim</span> text1 <span style="color:blue;">As</span> Aspose.Pdf.Generator.<span style="color:#2b91af;">Text</span> = <span style="color:blue;">New</span> Aspose.Pdf.Generator.<span style="color:#2b91af;">Text</span>(string1)
    text1.IsHtmlTagSupported = <span style="color:blue;">True</span>

    <span style="color:blue;">Dim</span> f_dest <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:#a31515;">"C:\test.pdf"</span>
    <span style="color:#2b91af;">Process</span>.Start(f_dest)</pre><br>

Hi Nick,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code.

I am able to generate your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-34059. You will be notified via this forum thread regarding any updates against your reported issue. Also, I have requested the development team to share an ETA regarding the issue after they complete their analysis. Please be patient and spare us sometime and we will notify you via this forum thread once we have a feedback from the development team.

Sorry for the inconvenience,

Has this been resolved? I’m running into a similar issue. Thanks.

Hi there,

Thanks for your inquiry. I’m afraid, the reported issue is still not resolved due to some other priority tasks and it’s pending in the queue for analysis. I've requested the development team to share the ETA at earliest and as soon as I get a feedback I will update you via this forum thread.

Sorry for the inconvenience faced.

Best Regards