jodconverter转换带密码office文件

This commit is contained in:
陈精华
2022-12-19 16:38:50 +08:00
parent d761d0cc88
commit f52169ec27
5 changed files with 93 additions and 17 deletions

View File

@ -92,7 +92,7 @@ public class OfficeFilePreviewImpl implements FilePreview {
} else {
if (StringUtils.hasText(outFilePath)) {
try {
officeToPdfService.openOfficeToPDF(filePath, outFilePath);
officeToPdfService.openOfficeToPDF(filePath, outFilePath, fileAttribute);
} catch (OfficeException e) {
if (isPwdProtectedOffice && !OfficeUtils.isCompatible(filePath, filePassword)) {
// 加密文件密码错误,提示重新输入