本文整理匯總了C#中iTextSharp.text.pdf.PdfPRow.SetExtraHeight方法的典型用法代碼示例。如果您正苦於以下問題:C# PdfPRow.SetExtraHeight方法的具體用法?C# PdfPRow.SetExtraHeight怎麽用?C# PdfPRow.SetExtraHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iTextSharp.text.pdf.PdfPRow
的用法示例。
在下文中一共展示了PdfPRow.SetExtraHeight方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AdjustCellsInRow
/**
* Calculates the extra height needed in a row because of rowspans.
* @param start the index of the start row (the one to adjust)
* @param end the index of the end row on the page
* @since 2.1.6
*/
virtual protected PdfPRow AdjustCellsInRow(int start, int end)
{
PdfPRow row = GetRow(start);
if (row.Adjusted) return row;
row = new PdfPRow(row);
PdfPCell cell;
PdfPCell[] cells = row.GetCells();
for (int i = 0; i < cells.Length; i++)
{
cell = cells[i];
if (cell == null || cell.Rowspan == 1)
continue;
int stop = Math.Min(end, start + cell.Rowspan);
float extra = 0;
for (int k = start + 1; k < stop; k++)
{
extra += GetRow(k).MaxHeights;
}
row.SetExtraHeight(i, extra);
}
row.Adjusted = true;
return row;
}