2.0版本

This commit is contained in:
陈精华
2019-05-07 10:15:25 +08:00
committed by kl
parent a663e99bcd
commit 3813f75f65
8 changed files with 9 additions and 6 deletions

View File

@ -40,6 +40,7 @@ public class PdfFilePreviewImpl implements FilePreview{
String suffix=fileAttribute.getSuffix();
String fileName=fileAttribute.getName();
String officePreviewType = model.asMap().get("officePreviewType") == null ? "" : model.asMap().get("officePreviewType").toString();
String originUrl = model.asMap().get("originUrl").toString();
model.addAttribute("pdfUrl", url);
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "pdf";
String outFilePath = fileDir + pdfName;
@ -54,7 +55,7 @@ public class PdfFilePreviewImpl implements FilePreview{
}
outFilePath = response.getContent();
}
List<String> imageUrls = pdfUtils.pdf2jpg(outFilePath, pdfName, url);
List<String> imageUrls = pdfUtils.pdf2jpg(outFilePath, pdfName, originUrl);
if (imageUrls == null || imageUrls.size() < 1) {
model.addAttribute("msg", "pdf转图片异常请联系管理员");
model.addAttribute("fileType",fileAttribute.getSuffix());