How to start new pages automatically whenever the text string cannot fit on the current page in praw

I am trying to generate a PDF invoice using prawn with header, body and footer. The content of the body may change. I’m using bounding_box to place content in the body. If the content cannot fit on the current page body, it should automatically place the remaining content in body portion of the new page. Please help me with the coding.

This is the default behavior of Prawn. You should find an example of exactly this in the manual.


Rob Biedenharn