I am trying to wrap my head around what I thought would be a simple task. We are moving to using the Advanced PDF Template for our invoices, and I want to print the page number, but only if there are more than 1 pages. This seems to be not easy to do, because it is a mix of both Freemarker and BFO. BFO has the pagenumber and totalpages variables, but can those be accessed using Freemarker if statement?
This is what I am trying:
<#if (totalpages > 1)>Page <pagenumber/> of <totalpages/></#if>
It is giving me a Expression totalpages is undefined error when trying to save the template.