|
@@ -1,5 +1,6 @@
|
|
package com.ruoyi.common.utils;
|
|
package com.ruoyi.common.utils;
|
|
|
|
|
|
|
|
+import com.ruoyi.common.config.RuoYiConfig;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import org.docx4j.TraversalUtil;
|
|
import org.docx4j.TraversalUtil;
|
|
import org.docx4j.XmlUtils;
|
|
import org.docx4j.XmlUtils;
|
|
@@ -33,6 +34,11 @@ import java.util.*;
|
|
public class WordUtil {
|
|
public class WordUtil {
|
|
public static AjaxResult wordFilePath(String wordFilePath,String image) {
|
|
public static AjaxResult wordFilePath(String wordFilePath,String image) {
|
|
try {
|
|
try {
|
|
|
|
+ // 上传文件路径
|
|
|
|
+ String filePath = RuoYiConfig.getUploadPath();
|
|
|
|
+ if (StringUtils.isNotEmpty(wordFilePath)){
|
|
|
|
+ wordFilePath = wordFilePath.replace("/profile/upload",filePath);
|
|
|
|
+ }
|
|
WordprocessingMLPackage wordMLPackage = load(wordFilePath);
|
|
WordprocessingMLPackage wordMLPackage = load(wordFilePath);
|
|
|
|
|
|
// 提取正文
|
|
// 提取正文
|