Free Support Forum -

Rtf or Docx conversion to (m)html does not align table properly

Dear Reader,

I have a richttextfile with text and a table defined. If I convert the .rtf file to (m)html using AsposeWords, the alignment of the table is not as it is in the original file.

This problem is also present in AsposeWords and when converting from .docx to (m)html.

I have included a sample program and screenshots for your convenience highlighting the problem.

Kind regards,

Hi Huibert,

Thanks for your inquiry. While using the latest version of Aspose.Words i.e. 11.9.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version from the following link:

I hope, this helps.

Moreover, I have attached the Html output here for your reference.

Best Regards,

I think we are misunderstanding eachother.

In the first screenshot I show the alignment in the rtf document and in the second screenshot I show the alignment after converting from rtf to html.

In both my screenshot and your screenshot after conversion we see that the table is not aligned like the original document. The text in the table is not aligned like the text preceding the table.

Hi Huibert,

Thanks for the additional information. Yes, you’re right; the table content is shifted slightly towards left in Html. Please note that Aspose.Words tries to mimic the behaviour of Microsoft Word when exporting Word documents to Html format. I have attached two Html files, one produced by Microsoft Word and the other by Aspose.Words v11.9.0, here for your reference. Please open and compare these files in a Web Browser, these look to me identical. Please let me know if I can be of any further assistance.

Best Regards,

I understand the reasoning behind the behaviour now.

This is not what I'd like, but if it doesn't change from your end we will be able to work around it.

Thank you for your time and explanation.

Hi Huibert,

Thank you for your understanding. Please let us know any time you have any further queries. We’re always glad to help you.

Best Regards,