Cannot convert to pdf word2016 file

wordfiles.zip (18.8 KB)

Hi,

I have a Microsoft Word 2016 document (word16file.docx) which I want to convert to pdf like this:

com.aspose.words.Document doc = new com.aspose.words.Document(path);
doc.save(“pdffile.pdf”, SaveFormat.PDF);

I get this error: The document appears to be corrupted and cannot be loaded.

I have tried with different Word2016 documents and I always get the same error but, if I try to convert a Microsoft Word 2010 document (word10file.docx) using the same method, it works fine.

I am using aspose-words-18.3-jdk16.jar.

Waiting for your help. Thank you in advance.

@jbengoa,

Thanks for your inquiry.We have tested the scenario using latest version of Aspose.Words for Java 18.3 and have not found the shared issue. Please make sure that you are using latest version of Aspose.Words for Java 18.3 and using the same document.

Hi,

It works fine now.

We had two different versions of aspose-words in our project and it looks like it was taking the previous version.

Thanks

@jbengoa,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.