Support of <header> and <footer> elements

Support of <header> and <footer> elements which are rendered on each page. Footer additionally supports special span tags <span class="pageCounter"></span> and <span class="totalPages"></span> which are replaced by the current page number or the total page count (see example below).

```
<footer>
    <div style='text-align:center;'>Page <span class="pageCounter"></span>/<span class="totalPages"></span></div>
</footer>
```