0
votes

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.

1

1 Answers

0
votes

Sounds like you would have to edit the code inside the wkhtmltopdf appliaction to complete this. Here is a suggesting, looking in the wkhtmltopdf docs to see if there is a config setting to turn off page count. Then add your own numbering within the HTML begin converted.