This commit is contained in:
linfso 2024-07-28 17:01:56 +08:00
parent 140e9dc3c8
commit fc5b32bdfb

View File

@ -6,6 +6,7 @@ import com.deepoove.poi.config.Configure;
import com.deepoove.poi.data.PictureType;
import com.deepoove.poi.data.Pictures;
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import com.xdadan.erp.common.config.SystemConfig;
import com.xdadan.erp.common.core.pay.vitepay.sdk.Config;
import com.xdadan.erp.common.utils.BarcodeUtils;
import com.xdadan.erp.common.utils.StringUtils;
@ -61,8 +62,8 @@ public class DocUtils {
Document wordDoc = new Document(wordInput);
FontSubstitutionWarningCollector callback = new FontSubstitutionWarningCollector();
wordDoc.setWarningCallback(callback);
if(!StringUtils.isEmpty(Config.FONT_PATH)) {
FontSettings.setFontsFolder(DocUtils.FONT_PATH, false);
if(!StringUtils.isEmpty(SystemConfig.FONT_PATH)) {
FontSettings.setFontsFolder(SystemConfig.FONT_PATH, false);
}
PdfSaveOptions pso = new PdfSaveOptions();
wordDoc.save(pdfOutput, pso);