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.
Unfortunately, activation email could not send to your email. Please try again.

Header and footer

Thread ID:

Created:

Updated:

Platform:

Replies:

51103 Oct 27,2006 09:23 AM Oct 28,2006 12:49 AM Windows Forms 3
loading
Tags: PDF
Yusuf Abdulkadir
Asked On October 27, 2006 09:23 AM

Hi,
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.

Thanks.

CS38.zip

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

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

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

that work
Thanks

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

Hi Yusuf,

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

Regards,
Dhivya.

CONFIRMATION

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.

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.

;