Thank you for your reply, the problem is indeed related to Apache poi internal behaviour, I already mentioned the src code i 'm using this answer https://stackoverflow.com/a/58694535. I tried docx library in node.js but i got the same problem. but in the end i did fix the problem by using python-docx library, I created a simple api with python that gets the docx files from different sources and merge them to a single file.