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

Free Support Forum - aspose.com

Password protected Document

Hi,

I have a password protected docuement. When i try to convert the docuement without giving password using Aspose word for Java, its not throwing any error. Please suggest me some solution.My code looks like,

doc = new Document(“C:/vignesh/Aspose/AsposePassword/src/Output1.doc”,new LoadOptions(""));
doc.save(“src/Output.html”, SaveFormat.HTML);

Note:I have attached the document.

Hi

Thanks for your inquiry. Actually there is no password to open the document. There is a password to modify the document. That is why you can open the file using Aspose.Words without specifying a password.

You can check whether there is password to modify using code like the following:

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

System.out.println(doc.getWriteProtection().isWriteProtected());

Also, please see the documentation for more information:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/writeprotection.html

Best regards,