We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to display page number and created date in Footer using Aspose.pdf?


I m using the Aspose PDF version I want to show page number and date created in Footer of the page. Is it possible using this version? Please help.

This message was posted using Page2Forum from Aspose products - Documentation


Thanks for using our products.

The version that you have specified is quite old one and I am not entirely certain if the page number/date information will be displayed with that version or not, but you can try using the latest release version of Aspose.Pdf for .NET 4.5.0 to accomplish your requirement. I have tested the scenario and I am able to display the respective information in page footer. For your reference, I have also attached the resultant PDF that I have generated.


//Instantiate a Pdf object by calling its empty constructor
Pdf pdf1 = new Pdf();
//Create a section in the Pdf object
Aspose.Pdf.Section sec1 = pdf1.Sections.Add();

// Create a Footer Section of the document
Aspose.Pdf.HeaderFooter footer = new Aspose.Pdf.HeaderFooter(sec1);
// set the Odd footer of the PDF file
sec1.OddFooter = footer;
// set the Even footer of the PDF file
sec1.EvenFooter = footer;

// Create a Text object
Text txt = new Text("$D - Page: ($p of $P) ");
// Add text to Header section of the Pdf file

//Save the Pdf

Please visit the following links for detailed information over these topics.

In case you have any further query, please feel free to contact.