How to add page breaks where needed in the template ?
In order to force page breaks, use this tag : {@pagebreak}
Place it anywhere in your templtae, including in loops, and it will force the creation of a page break.
No need to change anything in the data you are sending to docMaker. Breaks are handled idrectly from the template.
How to avoid image cropping in tables
When generating a pdf based on a docx template, it may happen that images in tables could be cropped.
Solution : you have to double the line spacing in the cell where your image tag (should look like {%image}) is located.