Hello @all,
i have a problem with a nested table: If I insert a table in a cell of an outer table, then appears a space below the inner table. The space is aprroxemately 3cm and expands the outer cell. If i remove the inner table, the cells of the outer table are only expandet to the absolutly required vertical space.
I can not find the reason, there are no paddings in the involved objects.
Testcode:
Code:
var document = new Document();
PageSetup pageSetup = document.DefaultPageSetup.Clone();
pageSetup.Orientation = MigraDoc.DocumentObjectModel.Orientation.Landscape;
MigraDoc.DocumentObjectModel.Section section = document.AddSection();
var outerTable = section.AddTable();
outerTable.Borders.Width = 0.25;
outerTable.Borders.Style = BorderStyle.Single;
outerTable.Borders.Color = MigraDoc.DocumentObjectModel.Colors.Black;
var outerTableCol1 = outerTable.AddColumn("8cm");
var outerTableCol2 = outerTable.AddColumn("8cm");
var outerTableRow1 = outerTable.AddRow();
outerTableRow1.Cells[0].AddParagraph("Some Content in Cell 1, Row1");
var innerFrame = outerTableRow1.Cells[1].AddTextFrame();
var innerTable = innerFrame.AddTable();
var innerColum1 = innerTable.AddColumn("3cm");
var innerColum2 = innerTable.AddColumn("3cm");
var innerRow1 = innerTable.AddRow();
innerRow1.Cells[0].AddParagraph("Hallo");
innerRow1.Cells[1].AddParagraph("Welt");
var innerRow2 = innerTable.AddRow();
innerRow2.Cells[0].AddParagraph("Lala");
innerRow2.Cells[1].AddParagraph("Lulu");
innerTable.Borders.Width = 0.25;
innerTable.Format.Font.Size = 9;
innerTable.Borders.Color = MigraDoc.DocumentObjectModel.Colors.Red;
Attached you will find a screenshot of the document.
Thank you very much for your answer.
Arne