Hello vland,
We have resolved this problem partly, you can try the hot fix in the attachment. $p, setIsSubsequentPagesOnly() and setIsFirstPageOnly() are now supported in the HeaderFooter class of this hotfix.
You can write your code as follows:
HeaderFooter footer = new HeaderFooter(sec1);
Text footText = new Text(sec1, "Text: (Page $p of $P) the text you want");
footer.getParagraphs().add(footText);
footer.setIsSubsequentPagesOnly(true);
sec1.setOddFooter(footer);
sec1.setEvenFooter(footer);
But $P is still not supported in this hotfix. We are working hard on this issue, but this problem is very hard because you can get the total page number of the document only after the document has been finished. We will support $P in the future version of our product, but we cann't estimate when we will provide that feature.
We are sorry to bring you so much trouble. We are very appreciate your patience. Thank you for using our product.
Sandy.Zhang
Product Developer
Aspose Changsha Team
About UsContact Us