I am creating a PDF file. How do I add auto page numbering to the Header / Footer? I'm using the following code snippet for the footer:
Aspose.Pdf.HeaderFooter hf1 = new Aspose.Pdf.HeaderFooter(section);
hf1.DistanceFromEdge = 20;
section.OddFooter = hf1;
section.EvenFooter = hf1;
Text text = new Text(hf1, "Page 1"); // PAGE NUMBER IS STATIC
text.TextInfo.Alignment = Aspose.Pdf.AlignmentType.Center;
hf1.Paragraphs.Add(text);