QuestPDf 行 此容器将可用空间划分为单独的列。 列可以具有固定大小(以点为单位提供),也可以是比例的。 您可以在每个列中使用分页内容。 如果任何列的内容换行,整个容器也会换行。 .Row(row => { row.ConstantItem(100) .Background("#DDD") .Padding(10) .ExtendVertical() .Text("此列宽100点"); row.RelativeItem() .Background("#BBB") .Padding(10) .Text("此列占用可用空间的1/3"); row.RelativeItem(2) .Background("#DDD") .Padding(10) .Text("此列占用可用空间的2/3"); }); C#Copy 通过使用 Spacing() 方法,您可以指定每列之间的间距: .Row(row => { row.Spacing(20); row.RelativeItem(2).Border(1).Background(Colors.Grey.Lighten1); row.RelativeItem(3).Border(1).Background(Colors.Grey.Lighten2); row.RelativeItem(4).Border(1).Background(Colors.Grey.Lighten3); }); C#Copy