当我对一个加密限制打开权限的docx文件进行解密时,代码如下:
- Code: Select all
Document doc = new Document();
doc.loadFromFile(filePath,FileFormat.Docx,filePassword);
doc.removeEncryption();
报错信息:
- Code: Select all
Java.lang.IllegalStateException:Wrong Word version
但是当我对一个加密限制打开权限的doc文件进行解密时,使用的FileFormat.Doc,其他代码一样的,就可以正常解密。
如下附件docx文件打开密码:123456