I've a table that contains n records. If the table reaches for example page five, I want to insert a page (cover sheet) because the following pages should be packed into a separate envelope and then continue with the table.
I solved the problem partially using conditional breaks on table rows when a certain number of rows has been reached. This solution works only when all rows have the same height. If the heights vary the result is not as good as expected.
Can I create nodes and append them to the document-tree?
Could you not cause a conditional break when you reach the end of page 5. In the conditional break section you could test to see which page you are on and then if you are on page 5 see where the x,y coordinates are on the row you have added. If you are too close to the bottom of the page force the break.
I see .....I do not think you will get the info I request until after the script completes (the objects don't really exist until then that is why you are getting the rsult you mentioned). I do not see how you can do this today.