Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+10
-1
@@ -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();
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user