Html saveas odt tables display not proper

Hi sirs,
We open html file and save as odt file.
The odt’s tables display not proper.
The codes are below,

string rmhtmlPath = @"D:\test.html";
string rmodtPath = @"D:\test.odt";
var rmDoc = new Document(rmhtmlPath);

foreach(Table table in rmDoc.GetChildNodes(NodeType.Table, true))
{
    table.PreferredWidth = PreferredWidth.FromPercent(100);
    table.AllowAutoFit = true;
}
foreach(Section section in rmDoc)
{
    section.PageSetup.Orientation = Orientation.Landscape;
}
rmDoc.Save(rmodtPath);

Hi,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 16.10.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-14340. Your thread has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hi Awais,
Thank for your help.

Best Regards,
Rainmaker.

@rainmaker_ho,
The issues you have found earlier (filed as WORDSNET-14340) have been fixed in this Aspose.Words for .NET 17.11 update and this Aspose.Words for Java 17.11 update.
Please also check the following articles:

@awais.hafeez,
I use Aspose.Words v17.11 , html table in odt display still not the same in html file.
Please ref html2odt.png (137.3 KB)
Testing html is html2Word.zip (49.6 KB)
Thanks for your help.

@rainmaker_ho,

We are checking this scenario and will get back to you soon.

@rainmaker_ho,

It is to update you that we have created a separate WORDSNET-16212 request for the issue with column widths. However, I am afraid, we cannot implement that the table in output ODT file will have exactly same view as on conversion by MS Word. But on writing the auto-fit option correctly to ODT, the table will look much better. Hopefully, the results will be acceptable to you. Your thread has been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

@awais.hafeez,
Cloud you tell me how to set auto-fit options ?
Thanks.

@rainmaker_ho,

You do not have to specify any options. The fix will be available in Aspose.Words API as soon as the issue WORDSNET-16212 is resolved.

@awais.hafeez,
Thank your help.

@rainmaker_ho,
The issues you have found earlier (filed as WORDSNET-16212) have been fixed in this Aspose.Words for .NET 18.1 update and this Aspose.Words for Java 18.1 update.
Please also check the following articles: