我想设置行的最小高度。然而似乎有限制 我正在使用下面的代码 [ http://forum.pdfsharp.de/viewtopic.php?f=2&t=2812 ]
var spacerRow = t1.AddRow();
spacerRow.Height = "0.1mm";
var para2 = new Paragraph();
para2.Format.LineSpacingRule = LineSpacingRule.Exactly;
para2.Format.LineSpacing = "0.1mm";
para2.Format.SpaceBefore = 0;
para2.Format.SpaceAfter = 0;
spacerRow.Cells[0].Add(para2);
但高度并没有进一步降低。 间隔行位于带边框的行之间,如附图所示。
最佳答案
如果你想对所有行都这样做:
Table table = new Table();
table.Format.Alignment = ParagraphAlignment.Center;
table.Rows.HeightRule = RowHeightRule.Exactly;
table.Rows.Height = 5;
对于单行:
row = table.AddRow();
row.HeightRule = RowHeightRule.Exactly;
row.Height = 5;
关于c# - 行的最小高度 [Migradoc],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40975347/