max_pages for other printouts

What do you have in your mind? Can you pitch me into the right direction?

Jinja templates are hard to debug. If you know the max pages while building the print format data in the .py file then you can add it in the get_context method.

@rmehta, thank you for your detailed message.

Who has written this max_pages script? May I contact him/her directly…maybe there’s a chance to get the variable into another macro / .py script?

Here is where the context is build

https://github.com/frappe/frappe/blob/develop/frappe/templates/pages/print.py#L77

Maybe you can fix and send a pull request

was not able to do that…think we can close this :frowning: