itextpdf生成PDF
作者:互联网
package com.xzff.qt;
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.io.IOException;
/**
* 设置页面附加属性
*
* @author hongli.zhang
* @create 2020/5/18 21:00
**/
@Component
public class PDFBuilder extends PdfPageEventHelper {
private static final Logger LOGGER = LoggerFactory.getLogger(PDFBuilder.class);
public Phrase header;
public Phrase footer;
// 模板
public PdfTemplate total;
// 基础字体对象
public BaseFont bf = null;
// 利用基础字体生成的字体对象,一般用于生成中文文字
public Font fontDetail = null;
public PDFBuilder() {
}
public PDFBuilder(Phrase header, Phrase footer) {
this.header = header;
this.footer = footer;
}
public void setHeader(Phrase header) {
this.header = header;
}
public void setFooter(Phrase footer) {
this.foo
标签:Phrase,footer,itextpdf,生成,header,PDFBuilder,import,PDF,public 来源: https://blog.csdn.net/ajax_yan/article/details/115004632