Wrong grid lines when importing HTML table

Hi,

we are importing HTML tables into Word using Aspose.Words.

In prior versions as 13.9.0.0, it looks fine.

In newer versions or in the latest version 15.5.0.0, some of the grid lines are wrong. If you zoom in, you can see that there are double grid line.

I attached some files. As you can see, I created to different files for Aspose 15.5. For me, they look the same, so the "wrong" grid lines may not appear occasionally.

Do you have suggestions?

Kind regards,

Lutz

Hi Lutz,


Thanks for your inquiry. It would be great if you please create a standalone simplified runnable console application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing. As soon as you get this simple application ready, we’ll start further investigation into your issue and provide you more information. Thanks for your cooperation.

Best regards,

Hi Awais,

thanks for you response.

I attached a solution that reproduces the error.

But it is not the version of Aspose.Words, it is the usage of Table.CellSpacing on line 112 which causes the problem.

If you leave it out, everything looks fine.

Kind regards,

Lutz

Hi Lutz,


Thanks for the additional information. Please find attached sample input document and corresponding outputs produced using Aspose.Words 13.9.0 and 15.6.0 version.

Please also attach your initial document (word.docx) here for testing.

Best regards,

Hi Awais,

thanks for your response.

I attached the docx source file. The solution contains a doc file as well in the folder "External".

Kind regards,

Lutz

Hi Lutz,


Thanks for your inquiry. You can even reproduce this issue using MS Word 2013. Please do the following steps to observe the same behavior using MS Word 2013.

  1. Open Input.html with MS Word 2013
  2. Save it As DOCX
  3. Re-open DOCX
  4. Select Table, right click on it and choose Table Properties. Click ‘Options’ inside ‘Table’ tab.
  5. Tick ‘Allow spacing between cells’ check box and specify 0.01" value. Click ‘OK’ and again ‘OK’.
  6. Now, repeat steps 4 and 5 but just give 0.00" value to cell spacing. Click OK.
  7. Now at this point try zoom in and out to observe this behavior.

So, this seems to be an expected behavior. If we can help you with anything else, please feel free to ask.

Best regards,

Hi Awais,

you are right, thank you very much.

I just removed the "cellspacing" from code.

Again, thank you very much, and kind regards,

Lutz