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

Free Support Forum - aspose.com

Table Cell Width issue

Dear Technical support team


I’ve converting a html to word file with Word for Java.

When I converted it, there is an issue with cell width.

Please see the attached image.

As you can see from it, the width of cells are not exactly the same, even though I’ve set table-layout:fixed on the html tag.

The style, table-layout:fixed, doesn’t seem to be working correctly.

Can you please check on this issue and give me feedback ASAP.

I’ve uploaded the test html file.

Thanks.

Hi Changro,


Thanks for your inquiry. I have converted your HTML to DOCX using Aspose.Words 16.2.0 and attached it here for your reference. Please create a comparison screenshot highlighting (encircle) the problematic areas in this Aspose.Words generated DOCX and attach it here for our reference. We will investigate the issue further on our end and provide you more information.

Best regards,

Dear Support



Thanks for the update.



I understand it can’t be the exact same with html output, but I think the cell width issue is pretty serious issue because it ruins the consistency of a document.



I’ve attached another screen capture image with a highlight of the problematic part.



Please check it and let me know.



Thanks.



P.S. When you reply, please put g.kim@euroscope.at as CC.

Hi Changro,


Thanks for your inquiry. We managed to reproduce this issue on our end using Aspose.Words 16.3.0. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-13421. Your request 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 Changro,


Thanks for your inquiry. The problem occurs because currently Aspose.Words turns on ‘Automatically resize to fit contents’ option for imported tables. But, we mimic MS Word in this behavior. Also this makes result better in many cases. However, to disable this behavior you can run the code below after the document has been imported:

Document doc = new Document(MyDir + @“aspose_support_2.html”);

foreach (Table table in doc.GetChildNodes(NodeType.Table, true))

{

table.AllowAutoFit = false;

}

doc.Save(MyDir + @"16.3.0.docx");


Hope, this helps.

Best regards,
Hi Changro,

Regarding WORDSNET-13421, our product team has completed the work on your issue and has come to a conclusion that this issue and the undesired behavior you're observing is actually not a bug. So, we have closed this issue as 'Not a Bug'. Please use the workaround from my previous post. Hope, this helps.

Best regards,