Hi,
Tables that are wider than available document width are automatically compressed in Word, but not when saving to PDF. Please see attached screen dump.
I have included a small project that reproduces the problem (license file not included). Compare output from buttons “Word 5 cells width:200” and “PDF 5 cells width:200”.
Hi
Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved. As a workaround of this problem you can try calling UpdateTableLayout() method before saving the document to PDF.
Best regards,
This issue is fixed in the upcoming Aspose.Words 10.5 released end of September.
But even with this fix, you should not set CellFormat.Width in this case. You are setting 5 columns each almost 3" wide. Aspose.Words “thinks” this is what you actually want to do and lets this through to the PDF output.
If you want Aspose.Words to auto fit the table, just don’t set the width. There are other improvements related to tables and auto fit in this version, we will write more about this in the blog and in the documentation.