Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimum height of Row [Migradoc]

I want to set the minimum height of row. however it seems there is limit i am using below code [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);

but the height is not reducing any further. the spacer row is between the borderd rows as show in attached picture.

enter image description here

like image 265
Maqsood Avatar asked Dec 05 '16 13:12

Maqsood


1 Answers

If you want to do it for all rows:

Table table = new Table();
table.Format.Alignment = ParagraphAlignment.Center;
table.Rows.HeightRule = RowHeightRule.Exactly;
table.Rows.Height = 5;

For a single row:

row = table.AddRow();
row.HeightRule = RowHeightRule.Exactly;
row.Height = 5;
like image 80
homes Avatar answered Sep 18 '22 01:09

homes