SKK
SKK

Reputation: 1719

Repeat PdfPTable header in all the continuation pages using iText

How can I repeat the headings of a PdfPTable in all the pages if the length of the table exceeds one page?

Upvotes: 18

Views: 22359

Answers (1)

Blacklight
Blacklight

Reputation: 3827

Look at setHeaderRows(int headerRows) of PdfPTable. Rows defined there as a header should persist on new pages.

table.setHeaderRows(1)

for the first row as a header.

See the API.

Upvotes: 35

Related Questions