ソースを参照

3.1.0-pdf转jpg

xiaof 3 年 前
コミット
61589bbf7d

+ 3 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -602,9 +602,9 @@ public class TaskLogicServiceImpl implements TaskLogicService {
 //            createPdfUtil.deleteAttachment(attachmentIds, ftlList);
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
-//            if (Objects.nonNull(dictionaryConfig.sysDomain()) && dictionaryConfig.sysDomain().isOss()) {
-            basicAttachmentService.batchDeleteAttachment(basicAttachmentList);
-//            }
+            if (Objects.nonNull(dictionaryConfig.sysDomain()) && dictionaryConfig.sysDomain().isOss()) {
+                basicAttachmentService.batchDeleteAttachment(basicAttachmentList);
+            }
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ConvertUtil.java

@@ -376,7 +376,7 @@ public class ConvertUtil {
             PDPageTree pages = doc.getPages();
             int pageCount = pages.getCount();
             for (int i = 0; i < pageCount; i++) {
-                BufferedImage bim = pdfRenderer.renderImageWithDPI(i, 150);
+                BufferedImage bim = pdfRenderer.renderImageWithDPI(i, 200);
                 os = new ByteArrayOutputStream();
                 ImageIO.write(bim, "jpg", os);
                 byte[] dataList = os.toByteArray();