private double getRowThickness(PdfOutput output, Row r) { double rowThickness; if (r is RegularRow) { string[] rowVals = ((RegularRow)r).contents; rowThickness = minimumRowThickness; if (r.fixedThickness > 0) { rowThickness = r.fixedThickness; } else { for (int col = 0; col < columnCount; col++) { double height = output.GetWrappedTextHeight( r.font, r.fontSize, bordersX[col] + cellPaddingLeft, output.drawY - cellContentsDy, bordersX[col + 1] - bordersX[col] - cellPaddingRight, TextJustify.Left, rowVals[col] == null ? "N/A" : rowVals[col]); height += cellContentsDy + cellPaddingBottom; if (height > rowThickness) { rowThickness = height; } } } } else { string content = ((MergedRow)r).contents; if (r.fixedThickness > 0) { rowThickness = r.fixedThickness; } else { double height = output.GetWrappedTextHeight( r.font, r.fontSize, bordersX[0] + cellPaddingLeft, output.drawY - cellContentsDy, bordersX[columnCount] - bordersX[0] - cellPaddingRight, TextJustify.Left, content); height += cellContentsDy + cellPaddingBottom; rowThickness = Math.Max(height, minimumRowThickness); } } return(rowThickness); }