From 3dd3bc576dada8216099348ad8fd93fc070622b6 Mon Sep 17 00:00:00 2001
From: 杜洪波 <1074825718@qq.com>
Date: 星期五, 15 八月 2025 10:48:59 +0800
Subject: [PATCH] PDF操作类
---
src/main/java/com/product/file/util/AsposeUtil.java | 24 +++++++++---------------
1 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/product/file/util/AsposeUtil.java b/src/main/java/com/product/file/util/AsposeUtil.java
index 25e6f39..c35bbfc 100644
--- a/src/main/java/com/product/file/util/AsposeUtil.java
+++ b/src/main/java/com/product/file/util/AsposeUtil.java
@@ -1,24 +1,18 @@
package com.product.file.util;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import com.aspose.cells.Cells;
import com.aspose.cells.PdfSaveOptions;
-import com.aspose.cells.Workbook;
-import com.aspose.cells.Worksheet;
-import com.aspose.cells.WorksheetCollection;
+import com.aspose.cells.*;
import com.aspose.slides.Presentation;
+import com.aspose.words.SaveFormat;
import com.aspose.words.*;
import com.product.core.exception.BaseException;
import com.product.core.spring.context.SpringMVCContextHolder;
import com.product.file.config.FileCode;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
public class AsposeUtil {
private static int OFFICE_XLS = 1;
@@ -293,8 +287,8 @@
if (officeType.equals("doc") || officeType.equals("docx")) {
Word2Pdf(officePath, outFile);
} else if (officeType.equals("xls") || officeType.equals("xlsx")) {
-// Excel2Pdf(officePath,outFile);
- Excel2Html(officePath, outFile);
+ Excel2Pdf(officePath,outFile);
+// Excel2Html(officePath, outFile);
// xls2xlsx(officePath,outFile,officeType);
} else if (officeType.equals("ppt") || officeType.equals("pptx")) {
PPT2Pdf(officePath, outFile);
--
Gitblit v1.9.2