hi,
What you’re experiencing is a limitation of the standard Mendix Word document generation and how Word itself handles edited .docx content after generation.
Mendix generates the Word file using OpenXML based on your template structure. This works well as long as the template is consistent and simple. But as soon as complex layout elements such as:
are created, the generated .docx becomes fragile when Word recalculates layout on edit. Once Word reflows or recalculates the table layout, merged cells and nested tables often shift or lose structure, and Word cannot reliably export that recalculated layout to PDF. This is noticeable especially around table formatting and dynamic table regions.
This is not unusual — there are threads in the Community where complex table layouts in Word templates cause unexpected formatting issues, and in some cases Microsoft’s own layout engine (Office 365) will change how these templates behave after editing.
These all lead to Word recomputing layout during edit and frequently result in broken alignment or PDF export failure.
If users must manually edit the generated file and then export to PDF reliably, you may need to consider alternatives:
Most important points:
• The issue is usually caused by a complex Word template structure (nested tables, merged cells, repeating regions inside table rows).
• When you edit the document in Word, AutoFit and table reflow kick in, which breaks alignment and causes PDF export to fail.
• The combination of repeating regions + merged cells + nested tables is especially fragile and should be avoided.
• CKEditor / HTML content injected into the Word template can also break the layout after editing.
Best practices:
• Keep tables simple
• Use fixed column widths (disable AutoFit)
• Avoid nested tables inside repeating regions
• If edits are needed, change the data in Mendix and regenerate the document instead of editing it in Word
In short: complex templates are not stable when edited and then exported to PDF.