小编Mar*_*elo的帖子

使用Primefaces dataExporter更改生成pdf的样式

我正在使用Primefaces dataExporter从dataTable生成pdf.生成的pdf具有相同宽度的所有列.我正在寻找一种方法来改变postProcessor/preProcessor函数上表的样式.在生成pdf之前,我可以使用setHtmlStyleClass方法更改内容吗?我试图使用它,但没有成功.我想我没有理解它.

public void preProcessPDF(Object document) throws IOException, BadElementException, DocumentException {

    Document pdf = (Document) document;
    pdf.setHtmlStyleClass("reportClass");
    ...
}
Run Code Online (Sandbox Code Playgroud)

如果我可以使用该方法,我可以在哪里定义reportClass?它是浏览器页面的css类吗?

primefaces

2
推荐指数
1
解决办法
9488
查看次数

标签 统计

primefaces ×1