Open allbutsafe opened 2 years ago
The use of text areas in header/footer is a known limitation of M2Doc (see #312). For the moment a workaround can be to replace the text area with something else: table or some text with pagination.
Hi Yvan, Ok, thanks. Sorry for obviously not searching thoroughly enough before.
You can probably close this issue as a duplicate.
Regards, Nils
Don't worry, the terminology is not very clear and you provided a test case so thank you very much.
I will leave it open for the moment. This issue is a bit tricky since it imply changing the parser of M2Doc, so I'm not sure when we will address it.
I'm submitting a...
Current behavior
If I generate an M2Doc document with an example like the attached one (minimized to the problematic issue), then a combination of .asImage() and the footer (especially the text box in the footer) leads to a corrupt Word document. Can be fixed by Word when opening, but that’s annoying. The visible content is then as expected.
If you remove either the asImage() service usage or the text box, it works fine.
Note: I had difficulties identifying the problematic element from the footer, which originally had more elements - sometimes even the black background picture was enough to cause the issue. So it’s not limited to a textbox itself. I could provide more examples, if needed.
Expected behavior
Generation of a Word document, which is not corrupt.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Correct the behaviour. Identifying the problematic combination of m2doc commands and other template elements is difficult, as there is no error message.
Environment
Files: minimal_example.docx minimal_example.output.docx