Use a variable called Liner # to page it, see if Report's example is
Or explain the script
Use the FreeSpace function to determine how much blank area in the current page. If you are not enough, call the NewPage process to insert "Handmade Page" and start a new page.
IF Freespace * 5/18 <30 Then NewPage