Can i add conditional visibility on page break in a document template ?

0
I have created a functionality to generate a pdf document using a document  template , sometimes if the data is more i  want to move it to the next page or if it less I want to keep it in the same page hence is there any way I can add page break using any condition
asked
1 answers
0

HI Nikhil! I had the same issue and the only thing that worked for me was to create a non persistable entity with a boolean atribute that set its value by counting if the the data is more than a certain number, set that attribute to true and in the template, condition that page break according to this boolean attribute with conditional visibility. Not the best approach but it worked for me.

Hope it helps

answered