Hello
You can write script in layout:ready . After the layout has been applied, i.e. after page breaks have been inserted. You can use this event to access objects placed on master pages.
Java script
if ( xfa.layout.page(this) == xfa.layout.pageCount() ) //If last page
//Do your logic
endif ;
Formcal
varcurrpage = host.currentPage;
vartotalpage = host.numPages
if ( currpage == totalpage ) then //If last page
//Do your logic |
endif
Regards,
NP