|
|
@@ -9,6 +9,8 @@ import java.awt.*;
|
|
|
import java.io.*;
|
|
|
import java.net.HttpURLConnection;
|
|
|
import java.net.URL;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
|
|
|
/**
|
|
|
* Created by gyue on 2019-03-25.
|
|
|
@@ -41,6 +43,11 @@ public class Word2Pdf {
|
|
|
//lo.setEncoding(Encoding.getUTF8());
|
|
|
Document doc = new Document(inputStream);// 原始excel路径
|
|
|
|
|
|
+ FontSettings font = new FontSettings();
|
|
|
+ font.setFontsFolder(File.separator + "usr" + File.separator + "share" + File.separator + "fonts", true);
|
|
|
+ font.setDefaultFontName("KaiTi");
|
|
|
+ doc.setFontSettings(font);
|
|
|
+
|
|
|
/*PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(SaveFormat.PDF);
|
|
|
pdfSaveOptions.setOnePagePerSheet(true);
|
|
|
pdfSaveOptions.setAllColumnsInOnePagePerSheet(true);
|