We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Header and footer

Thread ID:





51103 Oct 27,2006 01:23 PM UTC Oct 28,2006 04:49 AM UTC WinForms 3
Tags: PDF
Yusuf Abdulkadir
Asked On October 27, 2006 01:23 PM UTC

I am trying to generate a forward only tables ( multiple tables ) and have a header and footer different for each page. There are a number of examples that shows how to change the header. But in this case if the table spans more than a page, the header is not drawn. If I attach the header to the .LastPage property, it gets over-written and if I attach it to the template it does not get drawn except in the first page of the starting of new table.

I have attached an example. How do I keep drawing the same header for the span of a table and then change it with a new table.



Dhivya K [Syncfusion]
Replied On October 27, 2006 05:32 PM UTC

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.



Administrator [Syncfusion]
Replied On October 27, 2006 09:40 PM UTC

that work

Dhivya K [Syncfusion]
Replied On October 28, 2006 04:49 AM UTC

Hi Yusuf,

Glad to know that it works fine.Thanks for the update!



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon