Text formatting issue

Hello,
As I am inserting text with url in doc so space is coming between text and url is break in next line as given below screen shot.

As I am using below code to insert summary

DocumentBuilder documentBuilder = new DocumentBuilder(worddoc);
documentBuilder.InsertHtml("<span style='font-size:13px; font-family:&quot; Helvetica&quot;,sans-serif;color:rgb(64,64,64);color:hsl(170,0,64);text-align: Justify;' >tested data&nbsp;<a class="16748" href="https://www.msn.com/en-in/news/India/centre-to-hike-dearness-allowance-pm-modi-holding-key-meet/ar-AA1i1nC1?ocid=msedgntp&cvid=8638fbe511d144bc8ab96b6d9d6c55b8&ei=9" title="https://www.msn.com/en-in/news/India/centre-to-hike-dearness-allowance-pm-modi-holding-key-meet/ar-AA1i1nC1?ocid=msedgntp&cvid=8638fbe511d144bc8ab96b6d9d6c55b8&ei=9" onclick="testopenurl(this)">https://www.msn.com/en-in/news/India/centre-to-hike-dearness-allowance-pm-modi-holding-key-meet/ar-AA1i1nC1?ocid=msedgntp&cvid=8638fbe511d144bc8ab96b6d9d6c55b8&ei=9</a>&nbsp; is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s </span>", true);

So please suggest how can resolve space issue in between text and URL breaking issue in next line

@RiteshK10 Unfortunately, I cannot reproduce the problem on my side. I have used an empty document as a target document:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertHtml("<span style=\"font-size:13px; font-family:'Helvetica';,sans-serif;color:rgb(64,64,64);color:hsl(170,0,64);text-align: Justify;\" >tested data&nbsp;<a class=\"16748\" href=\"https://www.msn.com/en-in/news/India/centre-to-hike-dearness-allowance-pm-modi-holding-key-meet/ar-AA1i1nC1?ocid=msedgntp&cvid=8638fbe511d144bc8ab96b6d9d6c55b8&ei=9\" title = \"https://www.msn.com/en-in/news/India/centre-to-hike-dearness-allowance-pm-modi-holding-key-meet/ar-AA1i1nC1?ocid=msedgntp&cvid=8638fbe511d144bc8ab96b6d9d6c55b8&ei=9\" onclick=\"testopenurl(this)\">https://www.msn.com/en-in/news/India/centre-to-hike-dearness-allowance-pm-modi-holding-key-meet/ar-AA1i1nC1?ocid=msedgntp&cvid=8638fbe511d144bc8ab96b6d9d6c55b8&ei=9</a>&nbsp; is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s </span>", true);
doc.Save(@"C:\Temp\out.docx");

Here is the produced output: out.docx (7.5 KB)

Could you please create a simple console application that will allow us to reproduce the problem on our side? The problem might occur because document builder uses formatting applied to the current paragraph in your target document, this might affect the appearance of the inserted HTML content.

@alexey.noskov thanks for update, as I am using below code but issue is not resolved. Doc is attached please check.

Document doc = new Document(); 
DocumentBuilder builder = new DocumentBuilder(doc);
builder.ParagraphFormat.Alignment = ParagraphAlignment.Justify;
string abc = "Testing Data Pvt Ltd. (البيانات التي تم اختبارها من قبل المطور) &nbsp;<a class='1302' href='http://localhost:50362/Operators/Frm_TestingReportData?q=l3ME0WdN3OFN3ECeAD5FAA==&amp;Entity=TK2lVBu0m6g=&amp;Entity=TK2lVBu0m6g=&amp;CheckName=English%20Media%20%E2%80%93%20Derog&amp;CheckJur=PKFiIUnYHpQ=' title='http://localhost:50362/Operators/Frm_DraftingReportData?q=l3ME0WdN3OFN3ECeAD5FAA==&amp;Entity=TK2lVBu0m6g=&amp;Entity=TK2lVBu0m6g=&amp;CheckName=English%20Media%20%E2%80%93%20Derog&amp;CheckJur=PKFiIUnYHpQ=' onclick='OpenMediaAddedUrl(this)'>http://localhost:50362/Operators/Frm_DraftingReportData?q=l3ME0WdN3OFN3ECeAD5FAA==&amp;Entity=TK2lVBu0m6g=&amp;Entity=TK2lVBu0m6g=&amp;CheckName=English%20Media%20%E2%80%93%20Derog&amp;CheckJur=PKFiIUnYHpQ=</a>&nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been&nbsp; Testing Data Pvt Ltd. (البيانات التي تم اختبارها من قبل المطور)&nbsp; <a class='1302' href='http://localhost:50362/Operators/Frm_DraftingReportData?q=l3ME0WdN3OFN3ECeAD5FAA==&amp;Entity=TK2lVBu0m6g=&amp;Entity=TK2lVBu0m6g=&amp;CheckName=English%20Media%20%E2%80%93%20Derog&amp;CheckJur=PKFiIUnYHpQ=' title='http://localhost:50362/Operators/Frm_DraftingReportData?q=l3ME0WdN3OFN3ECeAD5FAA==&amp;Entity=TK2lVBu0m6g=&amp;Entity=TK2lVBu0m6g=&amp;CheckName=English%20Media%20%E2%80%93%20Derog&amp;CheckJur=PKFiIUnYHpQ=' onclick='OpenMediaAddedUrl(this)'>http://localhost:50362/Operators/Frm_DraftingReportData?q=l3ME0WdN3OFN3ECeAD5FAA==&amp;Entity=TK2lVBu0m6g=&amp;Entity=TK2lVBu0m6g=&amp;CheckName=English%20Media%20%E2%80%93%20Derog&amp;CheckJur=PKFiIUnYHpQ=</a>&nbsp;&nbsp;the industrys standard dummy <a class='1301' href='http://localhost:50362/Operators/DraftReportData?q' title='http://localhost:50362/Operators/DraftReportData?q' onclick='OpenMediaAddedUrl(this)'>http://localhost:50362/Operators/DraftReportData?q</a>&nbsp; text ever since the 1500s &nbsp;";
builder.InsertHtml(abc);
doc.Save(@"C:\Temp\out.docx");

out.docx (12.2 KB)

@RiteshK10 You can set ParagraphAlignment.Left to avoid spaces, but the behavior is expected. The text is not actually wrapped by Aspose.Words. MS Word documents are flow documents by their nature and content is reflowed on the fly by the consumer application - MS Word.