Free Support Forum - aspose.com

Footer change depending on section page #

I have been requested to add a special footer to one particular section of a PDF. The section may or may not span multiple pages. The problem is that the footer isn't to be displayed at all times. The special footer will simply let the reader know that the information is continued on the next page (if it is). So, if there is only one page in the section, the footer will not be displayed at all. If there is more than one page, the footer should display on all but the last page of the section.

I have seen similar questions posted where developers were asking for a way to show a footer (or header) on all but the last page (like IsSubsequentPagesOnly but for the last page). A suggested work-around was to use "Page $p of $P" as the footer. This would work except that it provides the page # within the complete PDF. So, on the first page of the multi-page section, the footer could say "Page 9 of 14". This doesn't tell the reader anything regarding the possibility that the section they are reading is continued on the next page.

Is there functionality that I am overlooking that could help me provide this functionality? For example, is it possible to access the page numbers of a particular section? Or is there a viable work-around that will get me reasonably close?

Thanks,

Marit

Hello Marit,

Please try using $Sp to get the page number in the current section and $SP to get the page count of the current section. In case it does not satisfy your requirement, please feel free to contact.