Skip to content

Commit

Permalink
fix: fix ppt converter error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarrettluo committed Nov 17, 2024
1 parent cd8ac28 commit 3ff670c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.jiaruiblog.task.executor.TaskExecutor;
import com.jiaruiblog.util.poi.Converter;
import com.jiaruiblog.util.poi.PPTUtil;
import com.jiaruiblog.util.poi.PptxToPDFConverter;
import com.jiaruiblog.util.poi.PptToPDFConverter;

import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -41,7 +41,7 @@ protected void makePreviewFile(InputStream inStream, TaskData taskData) {
taskData.setPreviewFilePath(UUID.randomUUID() + ".pdf");
try {
OutputStream outStream = getOutFileStream(taskData.getPreviewFilePath());
Converter converter = new PptxToPDFConverter(inStream, outStream, true,
Converter converter = new PptToPDFConverter(inStream, outStream, true,
true);
converter.convert();
} catch (Exception e) {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/jiaruiblog/util/poi/PptToPDFConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;

/**
* <p></p>
Expand All @@ -24,7 +23,7 @@
*/
public class PptToPDFConverter extends Converter {

protected PptToPDFConverter(InputStream inStream, OutputStream outStream, boolean showMessages, boolean closeStreamsWhenComplete) {
public PptToPDFConverter(InputStream inStream, OutputStream outStream, boolean showMessages, boolean closeStreamsWhenComplete) {
super(inStream, outStream, showMessages, closeStreamsWhenComplete);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public void removeLogTest1() throws Exception {
.contentType(MediaType.APPLICATION_JSON)
// 设置返回值类型为utf-8,否则默认为ISO-8859-1
.accept(MediaType.APPLICATION_JSON)
.content(json.toJSONString()))
.content(json.toString()))
.andExpect(MockMvcResultMatchers.status().isOk())
.andReturn();

Expand Down

0 comments on commit 3ff670c

Please sign in to comment.