Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I repeat the headers of an iTextSharp PdfPTable on each page?

How can I get iTextSharp to repeat the headers of a PdfPTable on each page of the generated PDF?

like image 992
user147031 Avatar asked Jan 14 '10 08:01

user147031


People also ask

How to repeat headers in Pdf?

Right click and choose “Table Properties.” In the Table Properties window, click the “Row” tab. Check the box that labeled “Repeat as header row at the top of each page.”


1 Answers

You just need to set the PdfPTable.HeaderRows property to the number of rows in your PdfPTable's header like this:

table.HeaderRows = 1;
like image 128
Jay Riggs Avatar answered Sep 20 '22 12:09

Jay Riggs