Home Ask Login Register

Developers Planet

Your answer is one click away!

LoyC February 2016

How to fix Wkhtmltopdf incorrect page count

I am trying to merge multiple bills into a single pdf. Every bill has multiple pages and every bill has unique header and footer. To print out page count I use JavaScript code from documentation example. When I build pdf from a single bill, page count is correct, but when I pass in all bills, page count is total sum of every bill page. Headers are printed ok, they are unique for every bill, only the page count is summed together. Is there a way to fix the page count?


user1914292 February 2016

No, because each page is processed separately. So for the first webpages you could never get the total page count correct anyways, because the other webpages are not processed yet and the footer is already on the PDFs.

Post Status

Asked in February 2016
Viewed 3,670 times
Voted 12
Answered 1 times


Leave an answer

Quote of the day: live life