Hi,

I am already using the View-PDF token to display the current page number, that works perfect for me.

Is there also a possibility to have a token available to show the total number of pages?

I would like to show page 1 of 2 on page1 and show page 2 of 2 on page 2.

Thanks, great module by the way!

Comments

maxplus’s picture

Issue summary: View changes
vegansupreme’s picture

Based on my LIMITED knowledge of the code, it seems like the only way this could work is when making PDFs with a set number of items per page. Maybe there could be an option on the Views PDF token (field handler?) you're already using to get the page number. In the UI, you would have to specify the number of items per page, and then the code would divide (count($view->result)) by items per page to get the total number of pages.
In cases where there aren't a set number of items per page, Views PDF just adds a new page whenever the content gets close to the bottom. For those types of PDFs I don't think getting the total pages would be possible until after the view is rendered.
Any thoughts?

killua99’s picture

Status: Active » Closed (outdated)