Hello,
I would like to display the page numbers in the PDF files I generate with aspose.pdf for Java
I found many examples on how to do it in this forum but only with C#.
I adapted the code i found in theses examples for Java, but the result i got is a footer that displays $p.
It seems that this symbol $p used in C# is not recognized in Java.
Here is my code :
Pdf pdf = new Pdf();
Section sec1 = pdf.getSections().add();
HeaderFooter header1 = new HeaderFooter(sec1);
sec1.setOddFooter(header1);
sec1.setEvenFooter(header1);
header1.getParagraphs().add(new Text(sec1,"page $p"));
Text text1 = new Text(sec1,getFileContent());
sec1.getParagraphs().add(text1);
pdf.save(new FileOutputStream(new File("HelloWorldExample3.pdf")));
Can anybody help me, please?
Regards,