Repeat HTML Table Header and Footer in PDF Pages

EVO HTML to PDF Converter can automatically repeat the thead and tfoot of a HTML table in all the PDF pages where the table is rendered.

This feature is very useful when rendering long HTML tables in PDF because these tables span on many PDF pages and the table header is necessary to identify what represents each table column. It can also be used to create section headers in PDF when an arbitrary content from HTML is wrapped in a table with thead.

The converter will automatically repeat the HTML table and footer in PDF pages. You can disable the header and footer repeating using the converter API and setting the PdfDocumentOptions.TableHeaderRepeatEnabled and PdfDocumentOptions.TableFooterRepeatEnabled properties to false, or you can disable it from HTML adding style=”display: table-row-group” to thead and tfoot tags. An object of PdfDocumentOptions type is exposed by the HtmlToPdfConverter.PdfDocumentOptions property.

You can find a working example for repeating HTML table header and footer in PDF pages with complete C# source code in product demo website.