文件密码保护

时间:2017-07-17 15:09:57

标签: java libreoffice

我有一个转换工具,可以使用MS Doc filesPDF转换为LibreOffice Open Office。如果MS Doc受密码保护,则会执行转换并产生无意义。我希望能够检测源文件中是否存在密码。 在进行转换之前,可以使用StreamReader或属性来完成吗?

基本上

OfficeDocumentConverter converter = new OfficeDocumentConverter();
    if (!passwordOnSourceFile){
       convertedFile = new File("mynewfile.pdf");
       converter.convert(originalForConversion, convertedFile); 
    }else{
       //Cant convert
    }

谢谢,

0 个答案:

没有答案