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

Free Support Forum - aspose.com

Tables in mergefields render with different borders

Hi,

When a mergefield contains a html table with a border (=1) and inserted as html, it used to render with a single line in the previous version that we used (14.11.0). With the new version (16.10.0) the border line is thicker.

After investigating the problem, I saw that the box “Allow spacing between cells” is checked and before it wasn’t.
In word: Table properties > Tab table | Options > Default cell spacing > Allow spacing between cells

We have a problem that this functionality is changed. Is their a property that we can use to have the same result as before? Or how can we fix this?
I have added a little sample project to simulate the problem.

Kind regards,
Ann

Hi Ann,


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem as WORDSNET-14469 in our issue tracking system. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hi Ann,


After further investigation on WORDSNET-14469, our product team has come to a conclusion that this issue and the undesired behavior you’re observing is actually not a bug in Aspose.Words. So, they will close this issue as ‘Not a Bug’.

The “Allow spacing between cells” option is a MS Word’s counterpart for the ‘border-collapse’ CSS property. The ‘border-collapse: collapse’ style sets the option to false, while ‘border-collapse: separate’ sets it to true. According to the HTML 5 specification, the default style used for tables is ‘border-collapse: separate’. Older versions of Aspose.Words ignored this requirement but this has been fixed and, as a result, now tables are imported from HTML with “Allow spacing between cells” set to true by default.

So, as a workaround, you can add ‘border-collapse: collapse’ to table style in order to override default HTML settings.

Hope, this helps.

Best regards,

Hi,


Oke, thanks for the workaround.

Kind regards,
Ann
Hi,

Regarding WORDSNET-14469, our product team has completed the work on your issue and has come to a conclusion that this issue is not a bug in Aspose.Words because Aspose.Words behaves in compliance with the HTML 5 specification. Your issue (WORDSNET-14469) has now been closed with 'Not a Bug' resolution. Please use the workaround mentioned in my previous post.

Best regards,