Free Support Forum - aspose.com

Discrepancy in Table Resizing behaviour between Word and PDF

In order to break cells having long data without spaces Eg. “Dividend_Allocation_by_Percentage_InternetExplorer_DB2_WAS_Windows_S1”, we are using the following code fragment
table.setPreferredWidth(PreferredWidth.fromPercent( 100));
table.setAllowAutoFit(false);

This works perfectly fine with Word document giving us a table resized to fit the page and cells having proper widths. The problem however is that in this scenario, the PDF table is not resized to fit the page.

Hi Franklin,


Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.1.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.1.0 and let us know how it goes on your side. I hope, this will help.

If the problem still remains, please attach your input Word document here for testing. I will investigate the issue on my side and provide you more information.