HTML Styles are Changed after HTML>DOCX>HTML Conversion using .NET

Hi,

We, at Siemens, are using Aspose.Words 19.2 in our product Active Workspace.

We use it to convert word file to html and html to word. While doing the same, it is adding or modifying the styles in list elements. And because of the style difference, we are getting unexpected results in our product.

We tried using the latest version of Aspose.Words but we found the same result.

Please find attached a zip file containing the original html and the modified html. The original html is the data got from the first word to html conversion. After that, the html is converted to word, where a modification is made in a paragraph element above the list elements, and then the word is converted into html, which is the modified html. Even though there was no modification made to the list elements, we find that there is difference in the style of the list elements ( differ in margin and padding). This gives us incorrect results.

Is there a fix for the above?

Files.zip (1.9 KB)

Thanks,
Bhavna

@bhavna1

We have tested the scenario using the latest version of Aspose.Words for .NET 21.4 and have not found the shared issue. So, please use Aspose.Words for .NET 21.4. We have attached the output HTML with this post for your kind reference.
21.4.zip (979 Bytes)

If you still face problem, please ZIP and attach screenshots of problematic sections of output HTML along with expected output HTML. We will investigate this issue further and provide you more information on it.

Hello,

AllFiles.zip (125.7 KB)
AllFiles.zip (125.7 KB)
AllFiles.zip (125.7 KB)

Thank you for your reply.

We are still facing the same issue so I will elaborate on our use-case. PFA a zip file that contains the originalWord file which is converted to html, seen in originalHtml. This originalHtml is then converted to Word and the word file is modified to add a sentence(“Add new text”) in the first paragraph. This modifiedWord file is now converted to html as modifiedHtml. We expect that the only difference between the originalHtml and modifiedHtml is the sentence added in the paragragh. But what we notice is that there is some major styling changes in the entire html including other paragraph and list elements that were not modified.

Let me know if you are still facing problems reproducing the issue.

Thanks,
Bhavna

@bhavna1

We are working over your query and will get back to you soon.

@bhavna1

Please note that HTML and Word file formats are quite different. So, sometimes it is hard to achieve 100% fidelity after HTML>DOCX>HTML conversion. However, the output looks good when open the HTML in browser or MS Word.

If you perform the same scenario using MS Word, the styles of HTML files will not be same.