Aspose Java Word showing com.aspose.words.UnsupportedFileFormatException

Hi,

We use “aspose-words-21.10.0-jdk17.jar” in our work place. I got this “com.aspose.words.UnsupportedFileFormatException Unknown file format.” exception with this line:

Document doc = new Document("C:\\Temp\\aaa.doc");

I will upload the “aaa.doc” soon.

This line was working before. But after user updated the document using “Stop protection”, “Restrict Editing”, “Restrict permission to this document”, it stopped working and threw this exception.

Can you take a look? Thanks.

aaa.docx (82.5 KB)

@Ligong It looks like the document is protected with Azure IPS. Aspose.Words cannot directly load such documents, since cannot decrypt them. Please see our documentation to learn how to work with such documents:
https://docs.aspose.com/words/net/work-with-document-market-by-sensitivity-label/