I'm using wkhtmltopdf to convert multi div tags to PDF. The divs are generated using repeater to display some data. The basic structure of the div is
<div class="container">
</div>
<div class="container">
</div>
If the page can't fit the container div in one page, wkhtmltopdf splits the content between pages. What I need to do is for each div, if the div is splitted between two pages I want to add the page number to the PdF -- but the number will be according to div not the total pages of PDF.
Example: if first div will be on two pages, the first page will have number 1 and second page will have number 2: adding a second div will begin numbering from 1 and so on.