Hi Yusuf,
Thank you for your interest in Essential PDF.
Thanks for sending the sample. I was able to see the problem in your code. You have used Table publishing events in generating table which publishes the table well before the headers. If you want to display the template in all the pages,you have to add the header template in PageCreated event which will be called every time when the page is created.
I have modified and simplified your sample in order to display the header in all the pages and different header text for different tables.
Here is a code snippet for your reference:
//Add the header in PageCreatedEvent
void pdfDoc_PageCreated ( object sender, PageCreatedEventArgs args )
{
AddHeader(pdfDoc, headerText, "HeaderAndFooter Demo Sample");
}
I have attached the modified sample for your reference
Please take a look into it and let me know if you have any other queries.
Regards,
Dhivya.
CS380.zip