How to set up document splitting
1. Create a FlexiLayout with the Header and Footer ( this will allow you to mark the beginning and the end of the invoice).
2. Upload this layout in the Document Definition
3 Go to the Project Properties in the Project Setup Station and select the following option: "Automatically when Document Definition is applied"
This will split the document into as many documents as there are pairs of Headers & Footers.
For detailed instructions check wiki.