Auto Size Column Widths in PDF Table

I am having some difficulty auto sizing the widths of the Table object in Aspose.Pdf. It requires me to initially set the ColumnWidths property but that is not helpful since Aspose requires this property to be set prior to the importing of the data table. However, at this point I would not know the widths of each respective column. Someone recommended that I get the minimum column width of the table after the data import is complete, and then set that width size back to the column in the table. That does not seem to work because the ColumnWidths property is overriding the manually setting of each column width. Could you please assist?
Albert Han

Hi,
According to my study, I don't find any problem in my testing, my testing code is below and please make sure you are using the latest dll.

Thanks.

[C#]

Pdf pdf1 = new Pdf();
Section sec1 = pdf1.Sections.Add();
Aspose.Pdf.Table table1 = new Aspose.Pdf.Table();
sec1.Paragraphs.Add(table1);
table1.ColumnAdjustment = ColumnAdjustmentType.AutoFitToContent;
Row row1 = table1.Rows.Add();
Cell cell1Row1 = row1.Cells.Add("ColumnsSpan = 2");
cell1Row1.ColumnsSpan = 2;
cell1Row1.Border = new BorderInfo((int)BorderSide.All, 0.5F);
Row row2 = table1.Rows.Add();
Cell cell1Row2 = row2.Cells.Add("cell11111111111111111111111111111111111111111111111111111");
cell1Row2.Border = new BorderInfo((int)BorderSide.All, 0.5F);
Cell cell2Row2 = row2.Cells.Add("cell2");
cell2Row2.Border = new BorderInfo((int)BorderSide.All, 0.5F, new Aspose.Pdf.Color("Red"));
pdf1.Save(@"D:\Test.pdf");