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

user147031 picture user147031 · Jan 14, 2010 · Viewed 24k times · Source

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

Answer

Jay Riggs picture Jay Riggs · Jan 16, 2010

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

table.HeaderRows = 1;