protected internal void AnalyzeRow(ArrayList rows, RenderingContext ctx) { ctx.maxCellBottom = IndentBottom; // determine whether Row(index) is in a rowspan int rowIndex = 0; ArrayList row = (ArrayList) rows[rowIndex]; int maxRowspan = 1; foreach (PdfCell cell in row) { maxRowspan = Math.Max(ctx.CurrentRowspan(cell), maxRowspan); } rowIndex += maxRowspan; bool useTop = true; if (rowIndex == rows.Count) { rowIndex = rows.Count - 1; useTop = false; } if (rowIndex < 0 || rowIndex >= rows.Count) return; row = (ArrayList) rows[rowIndex]; foreach (PdfCell cell in row) { Rectangle cellRect = cell.Rectangle(ctx.pagetop, IndentBottom); if (useTop) { ctx.maxCellBottom = Math.Max(ctx.maxCellBottom, cellRect.Top); } else { if (ctx.CurrentRowspan(cell) == 1) { ctx.maxCellBottom = Math.Max(ctx.maxCellBottom, cellRect.Bottom); } } } }