Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setSkipFirstHeader not working #536

Closed
kolaval opened this issue May 11, 2021 · 2 comments · Fixed by #537
Closed

setSkipFirstHeader not working #536

kolaval opened this issue May 11, 2021 · 2 comments · Fixed by #537
Milestone

Comments

@kolaval
Copy link

kolaval commented May 11, 2021

Describe the bug
Calling table.setSkipFirstHeader(true) does not skip the header rows on the first page.

To Reproduce
create basic table that spans multiple pages.

document.open();
PdfPCell cell;
PdfPTable mainTable = new PdfPTable(1);
mainTable.setWidthPercentage(100);

cell = new PdfPCell(new Phrase("HEADER 1"));
cell.setBorder(Rectangle.BOX);
mainTable.addCell(cell);

cell = new PdfPCell(new Phrase("HEADER 2"));
cell.setBorder(Rectangle.BOX);
mainTable.addCell(cell);

cell = new PdfPCell(new Phrase("HEADER 3"));
cell.setBorder(Rectangle.BOX);
mainTable.addCell(cell);

for (int i = 0; i < 100; i++) {
	cell = new PdfPCell(new Phrase("ROW "+i));
	cell.setBorder(Rectangle.BOX);
	mainTable.addCell(cell);
}

mainTable.setHeaderRows(3);
mainTable.setSkipFirstHeader(true);
mainTable.setSplitLate(false);
document.add(mainTable);

Expected behavior
First page should not have HEADER 1,2,3 rows.

Screenshots
image

@Wugengxian Wugengxian mentioned this issue May 11, 2021
1 task
@Wugengxian
Copy link

@kolaval I have fixed it #537, it is a little problem.

@asturio asturio linked a pull request May 13, 2021 that will close this issue
1 task
asturio added a commit that referenced this issue May 13, 2021
@asturio asturio added this to the 1.3.27 milestone May 24, 2021
@kolaval
Copy link
Author

kolaval commented Jun 23, 2022

@asturio Issue again in 1.3.28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants