Free Support Forum - aspose.com

Multiple SPANS breaking words in unexplained locations


#1

Hi,

I’m Using Aspose.Words for .NET (Version : 19.3). I’m converting word documents into HTML files and later I’m pushing the HTML files into Mark Logic (NoSQL database).

I see erroneous spacing issues in the HTML file after fetching it from Mark Logic. After analysis I could figure out that the issues is with unnecessary multiple SPANS generated by Aspose.

Below is the piece of the code for better understanding,

<h3 style="margin:6pt 0pt; page-break-after:avoid" section_id="30360217_head_4.3.5">
                <span style="font-family:Arial; font-size:11pt; font-weight:bold">4</span><span style="font-family:Arial; font-size:11pt; font-weight:bold">.</span><span style="font-family:Arial; font-size:11pt; font-weight:bold">3</span><span style="font-family:Arial; font-size:11pt; font-weight:bold">.</span><span style="font-family:Arial; font-size:11pt; font-weight:bold">5</span><span style="font-family:Arial; font-size:11pt; font-weight:bold"> </span><span style="font-family:Arial; font-size:11pt; font-weight:bold">Method of construction</span>
</h3>

My output is : 4.3.5 Method of construction

Aspose is creating multiple SPANS for 4.3.5 instead of just one SPAN.

Can anyone help me with this? Can we avoid this unnecessary multiple SPANS?

Thanks,
Atheeq


#2

@atheeqahmed

Please call Document.JoinRunsWithSameFormatting method before saving the document. This method joins runs with same formatting in all paragraphs of the document. Hope this helps you.

If you still face problem, please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.