Hello, I've got problem with nested tables. I figured out that the table generated without specified ColumnWidths isn't rendered correctly. To create my table I use code:
Aspose.Pdf.Generator.Pdf pdf = new Pdf();
APdfGen.Table mainTable = new APdfGen.Table();
//mainTable.ColumnWidths = "100 200";
mainTable.DefaultCellBorder = new Aspose.Pdf.Generator.BorderInfo((int)Aspose.Pdf.Generator.BorderSide.All);
APdfGen.Row row1 = mainTable.Rows.Add();
APdfGen.Cell cell1 = row1.Cells.Add("Cell1"), cell2 = row1.Cells.Add();
APdfGen.Table nestedTable = new APdfGen.Table(cell2);
//nestedTable.ColumnWidths = "100 100";
cell2.Paragraphs.Add(nestedTable);
APdfGen.Row nestedRow1 = nestedTable.Rows.Add(), nestedRow2 = nestedTable.Rows.Add();
nestedRow1.Cells.Add("nested table header").ColumnsSpan = 2;
nestedRow2.Cells.Add("nested cell 1");
nestedRow2.Cells.Add("nested cell 2");
pdf.Sections.Add().Paragraphs.Add(mainTable);
If I uncomment lines with ColumnWidths everything is ok. My question is: should I always specify implicitly the width of the columns to generate nested tables?
Aspose.Pdf.Generator.Pdf pdf = new Pdf();
APdfGen.Table mainTable = new APdfGen.Table();
//mainTable.ColumnWidths = "100 200";
mainTable.DefaultCellBorder = new Aspose.Pdf.Generator.BorderInfo((int)Aspose.Pdf.Generator.BorderSide.All);
APdfGen.Row row1 = mainTable.Rows.Add();
APdfGen.Cell cell1 = row1.Cells.Add("Cell1"), cell2 = row1.Cells.Add();
APdfGen.Table nestedTable = new APdfGen.Table(cell2);
//nestedTable.ColumnWidths = "100 100";
cell2.Paragraphs.Add(nestedTable);
APdfGen.Row nestedRow1 = nestedTable.Rows.Add(), nestedRow2 = nestedTable.Rows.Add();
nestedRow1.Cells.Add("nested table header").ColumnsSpan = 2;
nestedRow2.Cells.Add("nested cell 1");
nestedRow2.Cells.Add("nested cell 2");
pdf.Sections.Add().Paragraphs.Add(mainTable);
If I uncomment lines with ColumnWidths everything is ok. My question is: should I always specify implicitly the width of the columns to generate nested tables?