I created a document docx. I generated it in my server, with library docx4j. But sometimes i could open without any errors, but other times I could see an message advertising that this file has errors.
It is very strange, because it is aleatory, and I create the same files, but sometimes it's ok, and others is wrong.
Why doesn't it work?
I have found that if I save my file it works
like
wordMLPackage.save(new File("files/output.docx"));
but I have a browser to download this file so I use SaveToZipFile
SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
saver.save(outputStream);
And here it's problem. Sometimes it works, others wrong.
Thanks