From ceeeeff41dfea2a02a02f4cec11eb3628bb1d1af Mon Sep 17 00:00:00 2001 From: gaosong Date: Wed, 19 Oct 2022 14:55:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9PDF=E5=8A=A0=E5=AF=86?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jero/modules/system/util/PDFUtils.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java index c83b6776c..9738325ef 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/util/PDFUtils.java @@ -17,6 +17,7 @@ import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.io.*; +import java.lang.reflect.Field; @Slf4j public class PDFUtils { @@ -217,7 +218,10 @@ public class PDFUtils { String path = uploadpath + File.separator + fileName; newFilePath = path.replace(fileName, "transformation" + fileName); reader = new PdfReader(byes); - + //解密文件 + Field f = PdfReader.class.getDeclaredField("ownerPasswordUsed"); + f.setAccessible(true); + f.set(reader, Boolean.TRUE); // 加完水印的文件 os = new FileOutputStream(newFilePath); stamper = new PdfStamper(reader, os); @@ -286,6 +290,11 @@ public class PDFUtils { e.printStackTrace(); log.error(e.getMessage()); + } catch (IllegalAccessException e) { + e.printStackTrace(); + log.error(e.getMessage()); + }catch (NoSuchFieldException e) { + e.printStackTrace(); } finally { try { stamper.close(); From b42064c67d65ba8654f6527b5761b3b5aaa0ea82 Mon Sep 17 00:00:00 2001 From: sunFlower <787203167@qq.com> Date: Wed, 19 Oct 2022 15:22:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=9C=88=E6=8A=A5=E7=9A=84=E9=80=82=E7=94=A8=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regulationReport/components/modules/defaultTemplate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue index a7d4b6823..77c7b37cf 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue @@ -98,7 +98,7 @@ :placeholder="$t('PleaseSelect')+$t('scopeOfApplication')" :type="'checkbox'" :disabled="disabled" - :triggerChange="false" :dictCode="'apply_scope'"/> + :triggerChange="false" :dictCode="'fa3_gui1_yue4_bao4_-_shi4_yong4_fan4_wei2'"/>