I have a print container under document and list of print pages under each print container. I can add N number of products in each print page. In preview page there will be only one page. The products added in the edit page should fit in single page. If the products can not fit in the single page then those products should be moved into the next print page in the container. The products moved to next print page should fit in the preview page else the extra products should push to the next print page automatically. This should be followed for all the print pages under the print container.
Please provide a solution to achieve this functionality.