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. Image for the cookie policy date

PDF Footer - different per page

Is there a way to make a Footer that is not the same on each page? Basically I want to do footnotes. So if there is an item that has a footnote for it I will put a superscript # next to it and I want that to show up in the footer with the associated text for it.

There may or may not be a footnote section on each page and I don't know how much space they will take up in advance.

How is the best way to do this?


3 Replies

VK Vishnu Kumar Syncfusion Team February 8, 2008 09:56 AM UTC

Hi Jeff,

Thank you for your patience.

Issue There may or may not be a footnote section on each page and I don't know how much space they will take up in advance.

You can change the footer notes on each page using the pdfDoc_PageCreated event and you can provide the height and width of the footer using the below code snippet :


[c#]
Code for adding different footer notes:

private void pdfDoc_PageCreated(object sender, PageCreatedEventArgs arg)
{
arg.Page.Graphics.DrawRectangle(new RectangleF(PointF.Empty, new SizeF(arg.Page.DrawingWidth - 10, arg.Page.DrawingHeight - 10)));

PDFTemplateArea header = null;
PDFTemplateArea footer = null;

string PageTitle = null;
if (arg.Index < 1)
{
PageTitle = "Funding";
}
else if (arg.Index > 2 && arg.Index < 7)
{
PageTitle = "Shedule";
}
else
{
PageTitle = "Summary";
}

footer = AddFooter(arg.Page.Document, PageTitle, "Syncfusion Demo");
arg.Page.Footer = footer;

}

Code for footer and width :

PDFTemplateArea header = doc.Templates.Add(doc.LastPage.DrawingWidth, 60);



Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/PDF.Web/6.1.0.34/71628/main.htm


Please try running the above sample and let me know if this helps.

Regards,
Vishnu.





PR Priyatharcini June 9, 2008 08:36 AM UTC

Same issue in vb.net. could you please update the solution for vb.net.

Regards
Darsini

>Hi Jeff,

Thank you for your patience.

Issue There may or may not be a footnote section on each page and I don't know how much space they will take up in advance.

You can change the footer notes on each page using the pdfDoc_PageCreated event and you can provide the height and width of the footer using the below code snippet :


[c#]
Code for adding different footer notes:

private void pdfDoc_PageCreated(object sender, PageCreatedEventArgs arg)
{
arg.Page.Graphics.DrawRectangle(new RectangleF(PointF.Empty, new SizeF(arg.Page.DrawingWidth - 10, arg.Page.DrawingHeight - 10)));

PDFTemplateArea header = null;
PDFTemplateArea footer = null;

string PageTitle = null;
if (arg.Index < 1)
{
PageTitle = "Funding";
}
else if (arg.Index > 2 && arg.Index < 7)
{
PageTitle = "Shedule";
}
else
{
PageTitle = "Summary";
}

footer = AddFooter(arg.Page.Document, PageTitle, "Syncfusion Demo");
arg.Page.Footer = footer;

}

Code for footer and width :

PDFTemplateArea header = doc.Templates.Add(doc.LastPage.DrawingWidth, 60);



Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/PDF.Web/6.1.0.34/71628/main.htm


Please try running the above sample and let me know if this helps.

Regards,
Vishnu.







SS Sri Subhashini M Syncfusion Team June 30, 2008 05:29 AM UTC

Hi Jeff,

Sorry for the delay in getting back with you.

Please do find the vb sample from the below specified location and let me know if this helps.

http://www.syncfusion.com/support/user/uploads/Sample_9dc7b49f.zip

Regards,
Suba



Loader.
Live Chat Icon For mobile
Up arrow icon