@@ -17,6 +17,7 @@ public class PdfTest {
public static void main(String[] args) throws Exception {
ItextPDFUtil.createPdf(new ArrayList());
+
}
@@ -326,7 +326,6 @@ public class ItextPDFUtil {
document.add(table3);
document.newPage();
-
Paragraph newP1 = new Paragraph("中国人民财产保险股份有限公司 雇主责任保险(2015版) 投保清单", headfont);
newP1.setAlignment(1);
newP1.setSpacingBefore(5f); //设置段落上空白
@@ -12,6 +12,7 @@ import java.io.IOException;
*/
public class MyHeaderFooter extends PdfPageEventHelper {
// 总页数
PdfTemplate totalPage;
@@ -9,6 +9,7 @@ import com.itextpdf.text.pdf.PdfPTable;
* @date 2020-2-5 15:38
public class PdfTable {
private static int maxWidth = 460;
/**
* 创建单元格(指定字体)
@@ -16,6 +16,7 @@ import com.itextpdf.text.pdf.PdfWriter;
public class Watermark extends PdfPageEventHelper {
Font FONT = new Font(Font.FontFamily.HELVETICA, 30, Font.BOLD, new GrayColor(0.95f));
private String waterCont;//水印内容
@@ -122,7 +122,8 @@
<version>1.0.0</version>
</dependency>
<!-- 阿里大鱼短信jar包 end-->
<!--html转pdf start-->
<dependency>
<groupId>com.itextpdf</groupId>