C# 增加最后一个单元格的高度

C# 增加最后一个单元格的高度,c#,pdf,itextsharp,C#,Pdf,Itextsharp,我使用iTextSharp.text.pdf库创建了一个表 表一: 我使用的代码: var signTable = new PdfPTable(2); signTable.WidthPercentage = 65f; signTable.HorizontalAlignment = Element.ALIGN_RIGHT; signTable.SetWidths(new[] { 25, 40 }); //SignName cell = new PdfPCell(new Phrase(_loca

我使用iTextSharp.text.pdf库创建了一个表

表一:

我使用的代码:

var signTable = new PdfPTable(2);
signTable.WidthPercentage = 65f;
signTable.HorizontalAlignment = Element.ALIGN_RIGHT;
signTable.SetWidths(new[] { 25, 40 });

//SignName
cell = new PdfPCell(new Phrase(_localizationService.GetResource("PDFPackagingSlip.SignName", lang.Id), font));
cell.BackgroundColor = BaseColor.LIGHT_GRAY;
cell.HorizontalAlignment = Element.ALIGN_LEFT;
signTable.AddCell(cell);

//creates empty cell
cell = new PdfPCell();
signTable.AddCell(cell);

//SignDate
cell = new PdfPCell(new Phrase(_localizationService.GetResource("PDFPackagingSlip.SignDate", lang.Id), font));
cell.BackgroundColor = BaseColor.LIGHT_GRAY;
cell.HorizontalAlignment = Element.ALIGN_LEFT;
signTable.AddCell(cell);

//creates empty cell
cell = new PdfPCell();
signTable.AddCell(cell);

//Signature
cell = new PdfPCell(new Phrase(_localizationService.GetResource("PDFPackagingSlip.Signature", lang.Id), font));
cell.BackgroundColor = BaseColor.LIGHT_GRAY;
cell.HorizontalAlignment = Element.ALIGN_LEFT;
signTable.AddCell(cell);

//creates empty cell
cell = new PdfPCell();
signTable.AddCell(cell);

//add table to pdf document. 
doc.Add(signTable);
问题

如何增加最后添加的空单元格的高度?(右下角的单元格)

我尝试使用以下代码,但没有改变任何东西:

signTable.Rows[2].SetExtraHeight(5, 80f);
你可以用

cell.MinimumHeight = 80f;


我上次使用ItextSharp已经很久了,但你可以尝试边距或更好的填充方式……这不是一个很好的解决方案,但是你是否尝试过添加换行(
“\n”
或)而不是将单元格留空?@Alexipsigeon嗯,好主意,我会试试这个。
cell.FixedHeight = 80f;