Texts in a paragraph moves down to next line after upgrading Aspose Words 11.8 to 23.1

Texts in a paragraph moves down to next line after upgrading Aspose Words 11.8 to 23.1

When generated a pdf document using Aspose. Words 23.1, there are some differences in the text alignment compared to the document generated with Aspose 11.8

Pdf generated with Aspose 23.1

Pdf genrated with Aspose 11.8

In aspose 11.8 , the first paragraph is in just 3 lines. But the exact same data getting changed into 4 lines when generated with 23.1. Some extra space is there in the right side of the paragraph for aspose 23.1 version.

Please see the highlighted sections the images.

Providing the Actual template, Pdf generated with Aspose 23.1, Pdf Generated with Aspose 11.8 and the html code .Documents.zip (147.8 KB)

The html code provided in the attachemnt is getting generated dynamically from Stored Procedure and we merge it into the merge filed named “htmllegalDesc” in the template. In this section we are facing the mentioned issue

Kindly, help me to resolve this issue.

@Febinbabu Unfortunately, I cannot reproduce the problem on my side using the latest 23.9 version of Aspose.Words. I have used the following simple code for testing:

Document doc = new Document(@"C:\Temp\in.doc");
DocumentBuilder builder = new DocumentBuilder(doc);

builder.MoveToMergeField("htmllegalDesc");
builder.InsertHtml(File.ReadAllText(@"C:\Temp\src.html"));

doc.Save(@"C:\Temp\out.pdf");

Here is PDF document produced on my side: out.pdf (72.6 KB)