Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
CD
2022-10-19 15:33:44 +08:00
2 changed files with 11 additions and 2 deletions
@@ -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();
@@ -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'"/>
</a-form-model-item>
</div>
</a-col>