We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Table alignment issue - doc to html convversion

Hello,


We have purchased an Aspose licence. While converting from .doc to .htm/.html, we are experiencing the following discrepancy.
We tried converting a doc file to html using Microsoft Word first and then using Aspose. It was noticed that if the doc file contains a table and we center align the table (note that only the table is center aligned. The content within the table is left aligned.), then Microsoft Word encapsulates the table within a div in the converted file. Aspose does the same.
The issue is that Microsoft Word adds the div as:
(as shown in snapshot ‘Div_outside_table_MS.png’)

whereas Aspose adds the div as:
(As shown in snapshot ‘Div_outside_table_Aspose.png’)

PFA the following files for your investigation:
1. Original word file: Sample_Table_alignment.docx
2. The hmtl file as generated by MS Word: Sample_Table_alignment_MS.htm and folder Sample_Table_alignment_MS_files
3. The html file generated by Aspose Words: Sample_Table_alignment_Aspose.html
4. The 2 snapshots mentioned above.

Please can you get this issue resolved? Due to the discrepancy, we are facing alignment issues in the converted documents.

Hi Notorious,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 11.8.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The issue ID is WORDSNET-7202. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best Regards,
Hi,

Thanks for your patience. It is to update you that our development team has finished working on your issue (WORDSNET-7202) and has come to a conclusion that your issue and the behaviour you're observing with the DIV's align attribute is actually not a bug in Aspose.Words. Please note that always Aspose.Words always tries to generate clean HTML and in your case it uses the correct CSS syntax that is
. Also, the align attribute of
is deprecated in HTML 4.01. So, we've closed this issue as 'Not a Bug'. If we can help you with anything else, please feel free to ask.

Best Regards,