PDFLogicDocument footer

I am using the following code to try and add a footer to the page but it isn't displaying anything. How should this be done instead?

section = pdfDoc.AddSection();
paragraph = section.HeadersFooters.Footer.AddParagraph();
paragraph.AppendText("test footer");

Thanks,

Jeff

1 Reply

DK Dhivya K Syncfusion Team October 22, 2006 08:30 AM UTC

Hi Jeff,

I was able to reproduce the issue in your code. You need to add the footer distance explicitly in addition to your code to make the footer to display.

Here is a code snippet

//Add a section
IPDFSection section = document.AddSection();

//Set the footer distance
section.PageSetup.FooterDistance = 50f;

//Add the footer
IParagraph Footerpara=section.HeadersFooters.Footer.AddParagraph();

//Append the text.
Footerpara.AppendText("PageFooter").CharacterFormat.FontSize =20;

Here is a sample for your reference
DLSHeaderFooters.zip


Please take a look into it and let me know if you have any other queries.

Regards,
Dhivya.

Loader.
Up arrow icon