We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Saved docx opens in compatibility mode

Hi,


i have an odd problem with aspose words when i save in docx format.
A little bit of background: i have a word template that i populate with various information, then i save it in pdf and docx format.
For the whole process i use input/outputstream, not a single file is written / read.
The process is the following:
- i take the template;
- i populate it;
- i save in two variables, one for the pdf and one for the docx contents
- i let the user preview the pdf online (with primefaces pdf viewer) and download both formats

The pdf preview and file are fine, but the docx has a wrong document style and is opened in compatibility mode.
This is already odd, but it gets worst: if i save it via word and then reupload it and redowload it, the compatibility issue goes away and the style is preserved.

Any idea on why this is happening?

this is how i save the contents:

verifyVersionPdf = new ByteArrayOutputStream();
verifyVersionDocx = new ByteArrayOutputStream();
currentSetExamDoc.save(verifyVersionPdf, new PdfSaveOptions());

currentSetExamDoc.save(verifyVersionDocx, SaveFormat.DOCX);

thanks a lot!!

Hi,


Thanks for your inquiry. Please upgrade to the latest version of Aspose.Words for Java (14.3.0) from the following link and see how it goes on your side. I hope, this helps.
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

In case the problem still remains, please attach your input Word document and Aspose.Words generated output Word document showing the undesired behavior here for testing. What version of Microsoft Word application are you using to open output documents with?

Best regards,