boxable
boxable copied to clipboard
headerrow not added.
Hi, i created the following code, the header row isn't added, i checked also with a pdf inspector and the first object added is the next row but not the header (i used iText RUPS to check the pdf structure).
`float yStartNewPage = page.getMediaBox().getHeight() - (2 * margin); float tableWidth = page.getMediaBox().getWidth() - (2 * margin); boolean drawContent = true;
BaseTable table = new BaseTable(startY, yStartNewPage, margin, tableWidth, margin, document, page, true, drawContent);
//NOT ADDED Row<PDPage> headerRow = table.createRow(50); headerRow.setHeaderRow(true); Cell<PDPage> cell = headerRow.createCell(100, "HEADER"); cell.setFontSize(12); cell.setValign(VerticalAlignment.MIDDLE); table.addHeaderRow(headerRow);
Row<PDPage> interventionAreaRow = table.createRow(50);
Cell<PDPage> interventionAreaCell = interventionAreaRow.createCell(100, "Block");
interventionAreaCell.setFontSize(10);
interventionAreaCell.setTextColor(Color.darkGray);
interventionAreaCell.setValign(VerticalAlignment.MIDDLE);
table.draw();
//Editable field ADDED
startY = startY-30f;
String desc = "field text";
addTextBox(acroForm, document, page, "TextBox", desc, startX, startY, tableWidth, 160);
page = checkStartY(document, page, 20f);`