How Should I Handle Page Numbers?

While most legacy print programs attempt to count lines and perform pagination within the print program, this is a bad practice that we recommend discontinuing when moving to Blue Prairie Forms.  OpenOffice/Libre Office offers a variety of mechanisms for handling pagination and page numbering (including total pages) automatically.  By keeping pagination in the template, rather than in the server-side print program, it is possible to simplify the server-side code by simply allowing the server-side print program to assume that it is dealing with one infinitely-long sheet of paper.  The pagination will be automatically handled by OpenOffice/LibreOffice when it renders the document.

See Page Numbering Tutorial