ng:last-page-number

ng:last-page-number

This section explains the built-in XPath function: ng:last-page-number()

 

This function outputs the total number of pages of the output.

 

The function has no parameters.

 

You cannot use this function with other functions in an XPath expression (it can e.g. not be used in an if element) - unlike the ng:page-number function, as this number is inserted as the last thing when rendering the output.

 

The function is shown the value 99999 in the result view of the designer, but is correct in the final rendered output.

 

If you insert the function inside a text with a limited size, then you need to make sure, that the total number of pages can be printed within the designated area.

 

A text can be limited in size either by the properties on the page or by the container in which the text is inserted (if the text is inserted with a dynamic position).

 

If you want to insert elements in your template on the last page only, then you should refer to the section, Template: Make room for total on last page.

    • Related Articles

    • ng:page-number

      This section explains the built-in XPath function: ng:page-number() This function outputs the current page number of the output. The function has no parameters. You can use this function with other functions in an XPath expression - unlike the ...
    • Page element

      The page element in InterFormNG2 is the container of all the physical elements, that build up the output. A new template is created with a page element as you need that in order to generate any output at all. You insert an additional page element ...
    • Change page breaks of a spooled file

      When you merge an input spooled file with a template in InterFormNG2 e.g. for PDF or print output, then you normally want the same page breaks in the output as in the original input spooled file. You are however not necessarily limited by that and ...
    • ng:spoolMapCond

      IMPORTANT: This function is only supported for spooled files loaded in the old format, Version 1, which is not recommended - it is not supported for spooled files loaded in version 2, which is better, default alternative to load spooled files in. ...
    • Template: Make room for total on last page

      If you have a normal business document, then you are probably using the header and footer option for the template. A simple example is covered in the section, Template: Header, footer and body area. You might however have a special requirement for ...