Saving to Pdf without UpdateTableLayout issue

[Aspose.Words .NET v23.3.0]

I have a table with 7 columns. I want the table to be as wide as the page, where the middle column is just space [L1, L2, L3, ----space----, R1, R2, R3] is how it would look on the page. I’m using table.AutoFit(AutoFitBehavior.AutoFitToWindow) and CellFormat.PreferredWidth to accomplish this.

The docx file looks correct when I save to that format. But, when I save the Word document with SaveFormat.Pdf and don’t use UpdateTableLayout, all 7 columns are evenly spaced in the PDF document. I am saving to a memory stream if that matters.

I’ve tried using PdfSaveOptions { UpdateFields = true }, but that didn’t work either.

@kuenne looks like you are using the UpdateTableLayout method for the purpose it was created, but since this method is currently deprecated you can use the UpdatePageLayout method instead.

Here is a zip file with the example docx file I’m using and some NUnit tests using it. Only the UpdateTableLayout option produces the expected result.

19078-Aspose.Words.SaveAsPdf.zip (65.3 KB)

@kuenne
This is not a bug, because as I said you are using the UpdateTableLayout method for the purpose it was created, but since that method was deprecated I escalated this problem to be evaluated by our development team.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25155

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

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