A DOCX file saved using Aspose.Words cannot be converted using Adlib Express Server

Our Java web application uses Aspose.Words to generate documents with data from our application. Recently, a client wanted to use DOCX files instead of DOC. We made the switch with Aspose.Words so we are now saving to DOCX. The problem is that we take the generated document and run it through Adlib Express Server (
http://www.adlibsoftware.com/products/adlib-express.aspx) to convert it to a PDF document. Whenever we save to DOCX, Express Server errors with a message that the document is an Unsupported File Type. If I open the file in Microsoft Word and resave it, the file size changes and the document can be successfully converted. Does anyone know why Aspose.Words creates documents that Adlib Express Server cannot convert? I opened a ticket with Adlib and here is basically the response that I got from them:

It appears the ‘Aspose’ system is creating a DOCX file that contains the base structure of a Word file (can open for viewing) but certain content and structural elements are missing that indicate to Express that the file is a valid Word document. Express needs to know the content and structural data in order to perform the conversion.

Anyone have any insight or experience with Adlib Express Server compatibility? Whenever we save to a DOC file with Aspose.Words, Express Server can convert the document. I am attaching a sample file called “original.docx” which we generated with Aspose.Words. That document fails conversion. I’m also attaching “resaved.docx” which was creating by opening the original file and resaving it with Microsoft Office. That document is successfully converted.

Also, I know that Aspose.Words can save to PDF. We have been using Express Server to convert documents and wanted to continue to do that if possible. If Aspose.Words and Adlib will never play nice, then we may have to change our code to use Aspose.Words do the conversion.

Thanks!

Hi
Joshua,

Thanks for your inquiry. Could you please try using OoxmlSaveOptions.setCompliance property for specifying the OOXML version for the output DOCX document? The default value is Ecma376_2006. Instead, please try using the following code and let us know how it goes with Adlib Express?

Document doc = new Document("C:\test\in.xxx");
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
saveOptions.setSaveFormat(SaveFormat.DOCX);
saveOptions.setCompliance(OoxmlCompliance.ISO_29500_2008_TRANSITIONAL);
doc.save("C:\test\out.docx", saveOptions);

Best Regards,

Thanks for the response, Awais!

I did try exactly what you suggested, but Express server is still giving me the same error when it tries to convert the generated DOCX file.

Do you have any other thoughts or suggestions?

Thanks,

Josh

Hi Josh,

Thanks for your feedback. I tried validating ‘original.docx’ using the Open XML SDK 2.0. This document did not pass the validation test on my side. I have logged this issue in our bug tracking system as WORDSNET-6139. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as WORDSNET-6139) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)