public static void Run()
{
// ExStart:ReplaceableSymbols
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_AsposePdfGenerator_Text();
// Instantiate Pdf instance by calling it empty constructor
Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
// Create a section in the pdf object
Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();
// Create a HeaderFooter object for the section
Aspose.Pdf.Generator.HeaderFooter hf = new Aspose.Pdf.Generator.HeaderFooter(sec1);
// Set the HeaderFooter object to odd and even footers
sec1.OddFooter = sec1.EvenFooter = hf;
// Add a text paragraph containing current page number of total number of pages
hf.Paragraphs.Add(new Aspose.Pdf.Generator.Text(hf, "page $p of $P"));
dataDir = dataDir + "ReplaceableSymbols_out.pdf";
// Create the result PDF Document
pdf1.Save(dataDir);
// ExEnd:ReplaceableSymbols
}
public static void SpecifiedParagraph()