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

Footer Not Showing

Thread ID:





74893 Jul 2,2008 02:11 PM UTC Jul 3,2008 08:34 AM UTC ASP.NET Web Forms (Classic) 1
Tags: PDF
Daaron Dwyer
Asked On July 2, 2008 02:11 PM UTC

My company is using, and when using your demo code, if I remove the page numbering item (#p;), the footer does not print.

Sample code:
public void FooterIssue()
PDFDocument _pdfDocument = new PDFDocument();
_pdfDocument.Compression = CompressionLevel.Best;
_pdfDocument.FileFormat = FileFormat.Format1_4;
_pdfDocument.Properties.Producer = "MyLeo";
_pdfDocument.Margins.Bottom = 50f;
_pdfDocument.AutoCreatePages = true;

IPDFFont font = _pdfDocument.Fonts.Add(FontBaseFamily.Helvetica);
font.Size = 12;

//Set properties for template box
IPDFGraphicState templateProps = _pdfDocument.CreateGraphicState();
templateProps.BackColor = new PDFColor(Color.White);

//IPDFGraphicState is used for setting properties of all drawing objects.
IPDFGraphicState props = _pdfDocument.CreateGraphicState();
props.BreakBehavior = AutoBreakBehavior.MultiLineTextBreak;

SizeF sizer = new SizeF(_pdfDocument.LastPage.DrawingWidth, 40);

PDFTemplateArea header = _pdfDocument.Templates.Add(sizer);
header.Graphics.DrawMultiText(new PointF(0, 0), sizer, "Header " + DateTime.Now.ToLongTimeString(), font, props);
_pdfDocument.Templates.Header = header;

//AddFooter(_pdfDocument, "Something #p;");

AddFooter(_pdfDocument, "Something");

private void AddFooter(PDFDocument doc, string FooterText)
PDFTemplateArea footer = doc.Templates.Add(new SizeF(
doc.LastPage.DrawingWidth, 40));

IPDFFont font = doc.Fonts.Add(FontBaseFamily.HelveticaBold);
font.Size = 10;
string text = FooterText;
SizeF size = footer.Graphics.MeasureString(text, font);
RectangleF bounds = new RectangleF(0, 15,
footer.Size.Width, footer.Size.Height);
IPDFGraphicState props = doc.CreateGraphicState();
props.TextAlignment = TextAlignment.Right;
props.BreakBehavior = AutoBreakBehavior.Cropping;

footer.Graphics.DrawMultiText(bounds, text, font, props);

doc.Templates.Footer = footer;

Sri Subhashini M [Syncfusion]
Replied On July 3, 2008 08:34 AM UTC


Thank you for using Syncfusion product.

Footer is not displaying properly.

The issue which is mentioned here is a defect, but the issue got fixed in the version I would like to recommend you to upgrade to the version You can download Essential Studio PDF version from the below thread:


Unlock key :

If your Essential Studio license is current, you will be able to obtain the key to install this version from your account in DirectTrac. Otherwise please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com.

Please let me know if you need any further assistance.



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

or the page will be automatically redirected to 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