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
close icon

Footers

hi we have a footer in the PDF we are creating but we cant get the dimentions right as it is always being obstructed by the text if we put the height in then it either is obstructed by the text still or not far enough away any ideas on where im going wrong!!


1 Reply

AD Administrator Syncfusion Team November 28, 2007 07:31 AM UTC

Hi Kevin,

Thank you for your interest in Syncfusion products.

If you want to draw the Footer text without being obstructed by the body text of the PDF, then you can set the PDF Page Width as Footer's width.

Here is the code snippet.

[C#]

// Size
RectangleF rect = new RectangleF(0, 0, doc.Pages[0].GetClientSize().Width, 50);

//Create a page template
PdfPageTemplateElement footer = new PdfPageTemplateElement(rect);
footer.Graphics.DrawString(footerText, font, brush, new RectangleF(0, 18, footer.Width, footer.Height));
Pdfdoc.Template.Bottom = footer;

Please refer the sample that shipped with Essential studio in the below location.

..\5.2.0.25\Web\pdf.web\Samples\2.0\PageElements\HeaderFooter

Please let us know if this helps you.

Regards,
Jaya


Loader.
Live Chat Icon For mobile
Up arrow icon