问题修改
This commit is contained in:
@@ -110,7 +110,9 @@ public class WordUtils {
|
||||
// 打开文档
|
||||
document = Dispatch.call(documents, "Open", wordFile, false, true).toDispatch();
|
||||
// 如果文件存在的话,不会覆盖,会直接报错,所以我们需要判断文件是否存在
|
||||
addWatermark(app,documents,document,wordFile,"D:\\anrui\\1.doc",mark);
|
||||
if (StringUtils.isNotBlank(mark)){
|
||||
addWatermark(app,documents,document,wordFile,wordFile,mark);
|
||||
}
|
||||
//setWaterMark(app,mark);
|
||||
File targetFile = new File(pdfPath);
|
||||
if (!targetFile.exists()) {
|
||||
@@ -158,7 +160,7 @@ public class WordUtils {
|
||||
//取得视窗对象
|
||||
Dispatch view = Dispatch.get(activePan, "View").toDispatch();
|
||||
//打开页眉
|
||||
Dispatch.put(view, "SeekView", new Variant(9));
|
||||
Dispatch.put(view, "SeekView", new Variant(1));
|
||||
//获取页眉和页脚
|
||||
Dispatch headfooter = Dispatch.get(docSelect, "HeaderFooter")
|
||||
.toDispatch();
|
||||
|
||||
Reference in New Issue
Block a user