We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

FixedColumnWidths questin


I have a question regarding behavior of table.AutoFit(AutoFitBehavior.FixedColumnWidths)

If I call it in the end of filling a table with cells will it affect the widths of the cells already in the table?


Hi Alex,

Thank you for inquiry.

When a table has auto fit disabled and fixed column widths used instead the following steps are taken:
1. The Table.AllowAutoFit property is disabled so columns widths do not grow or shrink to their contents.
2. The table-wide preferred width is removed from Table.PreferredWidth.
3. The CellFormat.PreferredWidth is removed from all cells in the table. The end result is a table whose column widths are defined using CellFormat.Width property and whose columns do not automatically resize when the user enter texts or the page size is modified.
Please follow up the documentation here.

Note: that if no width is defined for CellFormat.Width then a default value of one inch (72 points) is used.

Hope this will help. In case of any ambiguity please let me know.