public abstract class WordReportUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
logger |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
convertDocxToPdf(String docxFilePath,
String pdfFilePath)
这个可以在linux运行,缺点是转换的不完美 自动编号的转换会有错误,并且只能转换Docx,就是xml格式的word文档
|
static void |
reportDocxWithFreemarker(Object params,
String templateName,
String outputFileName)
根据模板导出word文件
|
static void |
reportListDocxWithFreemarker(Object params,
String templateName,
String outputFileName) |
static void |
reportSmartDocxWithFreemarker(Object params,
String templateName,
String outputFileName) |
public static void convertDocxToPdf(String docxFilePath, String pdfFilePath) throws Exception
docxFilePath - word文件路径pdfFilePath - pdf文件路径questionAnswerException - 转换异常public static void reportDocxWithFreemarker(Object params, String templateName, String outputFileName)
params - ReportData对象为数据对象,里面存储Map 数据templateName - 模板文件路径outputFileName - 输出文件路径public static void reportListDocxWithFreemarker(Object params, String templateName, String outputFileName)
Copyright © 2025 江苏南大先腾信息产业股份有限公司. All rights reserved.