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.Point2D;
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class PDFUtils {
|
public class PDFUtils {
|
||||||
@@ -217,7 +218,10 @@ public class PDFUtils {
|
|||||||
String path = uploadpath + File.separator + fileName;
|
String path = uploadpath + File.separator + fileName;
|
||||||
newFilePath = path.replace(fileName, "transformation" + fileName);
|
newFilePath = path.replace(fileName, "transformation" + fileName);
|
||||||
reader = new PdfReader(byes);
|
reader = new PdfReader(byes);
|
||||||
|
//解密文件
|
||||||
|
Field f = PdfReader.class.getDeclaredField("ownerPasswordUsed");
|
||||||
|
f.setAccessible(true);
|
||||||
|
f.set(reader, Boolean.TRUE);
|
||||||
// 加完水印的文件
|
// 加完水印的文件
|
||||||
os = new FileOutputStream(newFilePath);
|
os = new FileOutputStream(newFilePath);
|
||||||
stamper = new PdfStamper(reader, os);
|
stamper = new PdfStamper(reader, os);
|
||||||
@@ -286,6 +290,11 @@ public class PDFUtils {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
|
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}catch (NoSuchFieldException e) {
|
||||||
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
stamper.close();
|
stamper.close();
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@
|
|||||||
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
||||||
:type="'checkbox'"
|
:type="'checkbox'"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:triggerChange="false" :dictCode="'apply_scope'"/>
|
:triggerChange="false" :dictCode="'fa3_gui1_yue4_bao4_-_shi4_yong4_fan4_wei2'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|||||||
Reference in New Issue
Block a user