Table column width in PDF export when mixing millimeter and percent widths

Hi,

see attached sample: I create a table with fixed column widths and 100% page width. Some columns have a percent width and others have a millimeter width.
The result looks fine in word, but in PDF export the table is much smaller and the column widths are ignored.
If all column have percent width or all columns have millimeter width, it works.

Here is the sample (you have to fix the reference to Aspose.Words before starting it).
TableToPdf.zip (10.9 KB)

This is not really a problem for us - if I don’t mix millmeter/percent in our report, it is easy fixable.

Best regards

Wolfgang

@wknauf,

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 in our issue tracking system. The ID of this issue is WORDSNET-17060. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

In the meantime, please call Document.UpdateTableLayout(); method before saving to PDF as a workaround.

Thank you! No hurry, the issue is easy to workaround :wink:

Best regards

Wolfgang

The issues you have found earlier (filed as WORDSNET-17060) have been fixed in this Aspose.Words for .NET 22.2 update also available on NuGet.

Thanks, I can confirm that my sample works now! 3.5 years for a fix is far away from your fix time standards :wink: - but as I wrote before this was not really an issue for me as it was easy to work around.

@wknauf Thank you for your feedback. We keep improving our table grid calculation algorithm. Aspose.Words have to mimic MS Word, and MS Word’s table grid calculation algorithm is quite tricky and sometimes very difficult to predict.