I'm a newbie in TWIG. But I have to resolve some trouble with the page numbering.
I have the follow TWIG template
{% extends 'agreement/report_base_template.html.twig' %}
{% block title %}Personal card{% endblock %}
{% block content %}
{% for Person in AllPersons %}
{% set pageNum = 1 %}
<div id="content" class="page">
<!-- generate the frist page as a table //-->
<div style="page-break-after:always;"></div>
</div>
{% set pageNum = pageNum + 1 %}
<div id="content" class="page">
<!-- generate the second page as a table //-->
<div style="page-break-after:always;"></div>
</div>
<!-- other pages generated the same way //-->
{% endfor %}
{% endblock %}
That template generates the multi-page documents for each Person
.
UPD: added after 20 mins
There is the need to insert the number into the bottom right of each page as it's shown below.
And for each document, the number of the first page must be 1.
UPD: added after 7 hours
The use of JavaScript is also possible.