To add page numbering, you need to combine customised HTML in the PDF Layout with customised CSS in the PDF Stylesheet.

  1. PDF Layout HTML: In the Footer section (or the Header section), use an empty span element with a unique ID, for example pageNum, to act as a place holder for the page number.

    <span id="pageNum"/>
    
  2. PDF Stylesheet CSS: Create the following CSS selector rule for the empty span:

    #pageNum:before
    {
    content: counter(page);
    }
    

Analysing the above CSS selector rule in more detail: