I don't believe there is a simple way to achieve this in Mendix at this point. Some possibilities are:
Mendix does not support this, and the Studio Pro document templates functionality will not as to our knowlegde be further developed by Mendix.
We have a (licensed) solution available in which end-users can maintain document templates in Word. You can find it at https://marketplace.mendix.com/link/component/2026
Our module differs from the other marketplace content in that:
- Templates can be designed up pixel-perfect in Word with our Word add-on
- Data is not sent to external API's for generating your documents, but is kept inside your Mendix runtime
Please feel free to contact us at sales@appronto.nl for any further inquiries.
I have build an AppStore module based on the Apache POI Java library that can do exactly that! Seen many different implementations with it already and works like a charm. You would have to create a Mendix page where all the objects are created and can be seen in a WYSIWYG way and let my module do the generation. See:
https://marketplace.mendix.com/link/component/111539
it comes with a demo project.