boxable icon indicating copy to clipboard operation
boxable copied to clipboard

headerrow not added.

Open Neogene opened this issue 11 months ago • 0 comments

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);`

Neogene avatar Mar 03 '24 22:03 Neogene