/** * 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 */ protected PdfPRow adjustCellsInRow(int start, int end) { PdfPRow row = new PdfPRow(getRow(start)); row.initExtraHeights(); PdfPCell cell; PdfPCell[] cells = row.getCells(); for (int i = 0; i < cells.length; i++) { cell = cells[i]; if (cell == null || cell.getRowspan() == 1) continue; int stop = Math.min(end, start + cell.getRowspan()); float extra = 0; for (int k = start + 1; k < stop; k++) { extra += getRowHeight(k); } row.setExtraHeight(i, extra); } return row; }
/** * 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 */ protected PdfPRow adjustCellsInRow(int start, int end) { PdfPRow row = new PdfPRow(getRow(start)); row.initExtraHeights(); PdfPCell cell; PdfPCell[] cells = row.getCells(); for (int i = 0; i < cells.length; i++) { cell = cells[i]; if (cell == null || cell.getRowspan() == 1) continue; int stop = Math.min(end, start + cell.getRowspan()); float extra = 0; for (int k = start + 1; k < stop; k++) { extra += getRowHeight(k); } row.setExtraHeight(i, extra); } return row; }
/** * 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 */ protected PdfPRow adjustCellsInRow(int start, int end) { PdfPRow row = new PdfPRow(getRow(start)); row.initExtraHeights(); PdfPCell cell; PdfPCell[] cells = row.getCells(); for (int i = 0; i < cells.length; i++) { cell = cells[i]; if (cell == null || cell.getRowspan() == 1) continue; int stop = Math.min(end, start + cell.getRowspan()); float extra = 0; for (int k = start + 1; k < stop; k++) { extra += getRowHeight(k); } row.setExtraHeight(i, extra); } return row; }
extra += getRowHeight(j); firstRow.setExtraHeight(colIndex, extra); float diff = getRowspanHeight(rowIndex, colIndex) - getRowHeight(start) - extra;
extra += getRowHeight(j); firstRow.setExtraHeight(colIndex, extra); float diff = getRowspanHeight(rowIndex, colIndex) - getRowHeight(start) - extra;
extra += getRowHeight(j); firstRow.setExtraHeight(colIndex, extra); float diff = getRowspanHeight(rowIndex, colIndex) - getRowHeight(start) - extra;