I have an issue where .doc and .pdf files are coming out OK but a .docx file is coming out corrupt.
In order to solve that I am trying to debug why the .docx is corrup
web docx validator worked for me : http://ucd.eeonline.org/validator/index.php