ohh yes <@U9CS7LVCN> it worked like that, but anot...
# advancedpdf
t
ohh yes @scottvonduhn it worked like that, but another problem arised, that little table will go to every page of pdf, I want it at the last page only.
s
Yes, that is a common problem with advanced PDF’s. If you use the footer, it will be on every page. If you put something at the end, it won’t always be at the bottom of the last page. The only solution I know of is to create a pdfset, with PDF’s in the set. The second one will be your final page, with the table at the bottom. Unfortunately, that means it will appear on t he page AFTER the end of your main document, rather than at the bottom of the last page. There is no way to achieve exactly what you are looking for, since the pagination of elements can’t be determined in advance.
t
Oho, Yes I also tried to stick that to bottom, but it always gave error.
I think, I should try to print this using suitelet now. That should work.
Thanks a lot for your help.
m
you can add an if to your footer, so that part of your footer will only show in the last page
if page number = max page number
t
max page number ?
m
number of pages
page number = total pages
t
<pagenumber/> == <totalpages/>
yes
m
use the
<#if><#elseif></#if>
tags
t
I tried <#if <pagenumber/> == <totalpages/> > LAST PAGE</#if>Error <#if "<pagenumber/>" == "<totalpages/>" > LAST PAGE</#if> No Output <#if pagenumber == totalpages > LAST PAGE</#if>Error
@Mars Nothing Works, How does it work ?
message has been deleted
m
I haven't tried it myself but it may not be possible based on that document image
t
I am not able to grab the value of page number and total pages and do a real comarision
s
Sadly, it doesn’t work. The page numbers are calculated by BFO dynamically, whereas the if statements are run prior to BFO, by FreeMarker. FreeMarker can never know the pages in advance. It could be producing a single page HTML file just as easily as a PDF. The FreeMarker template has no concept of pages. As far as I know, there is no support for if statements in BFO, or any other kind of conditional logic.
BFO would need to add a new tag or property to support printing on the last page only to make this work.
t
Yes , I have gone through the document , I also didn't find any logic to do that.
Yes , I will write to BFO about this.
👍 1
m
At the moment we do not have a facility for explicitly assigning a footer or header to the last page in a document when the number of pages is unknown.
https://bfo.com/support/faq/#17
👍 2