public class XEasyPdfTemplateThymeleafDataSource extends Object
Copyright (c) 2020-2023 xsx All Rights Reserved. x-easypdf is licensed under the Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,Object> |
templateData
模板数据
|
protected String |
templatePath
模板路径
|
| 构造器和说明 |
|---|
XEasyPdfTemplateThymeleafDataSource() |
| 限定符和类型 | 方法和说明 |
|---|---|
Reader |
getSourceReader()
获取数据源读取器
|
protected InputStream |
processTemplate()
处理模板
|
XEasyPdfTemplateThymeleafDataSource |
setLocale(Locale locale)
设置所在区域
|
XEasyPdfTemplateThymeleafDataSource |
setTemplateData(Map<String,Object> templateData)
设置模板数据
|
XEasyPdfTemplateThymeleafDataSource |
setTemplatePath(String templatePath)
设置模板路径
注:资源路径以“classpath:”作为前缀
|
void |
transform(org.apache.fop.apps.FopFactory fopFactory,
org.apache.fop.apps.FOUserAgent foAgent,
OutputStream outputStream)
转换
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdomTransform, getDocumentContent, saxTransformprotected String templatePath
public XEasyPdfTemplateThymeleafDataSource setTemplatePath(String templatePath)
注:资源路径以“classpath:”作为前缀
templatePath - 模板路径public XEasyPdfTemplateThymeleafDataSource setTemplateData(Map<String,Object> templateData)
templateData - 模板数据public XEasyPdfTemplateThymeleafDataSource setLocale(Locale locale)
locale - 所在区域protected InputStream processTemplate()
public Reader getSourceReader()
getSourceReader 在接口中 XEasyPdfTemplateDataSourcepublic void transform(org.apache.fop.apps.FopFactory fopFactory,
org.apache.fop.apps.FOUserAgent foAgent,
OutputStream outputStream)
transform 在接口中 XEasyPdfTemplateDataSourcefopFactory - fop工厂foAgent - fo代理outputStream - 输出流Copyright © 2023. All rights reserved.