|
@@ -0,0 +1,372 @@
|
|
|
|
+package com.jpsoft.picc.modules.common.utils;
|
|
|
|
+
|
|
|
|
+import com.itextpdf.text.*;
|
|
|
|
+import com.itextpdf.text.pdf.*;
|
|
|
|
+import com.itextpdf.text.pdf.codec.Base64;
|
|
|
|
+import com.itextpdf.text.pdf.draw.LineSeparator;
|
|
|
|
+
|
|
|
|
+import java.io.File;
|
|
|
|
+import java.io.FileOutputStream;
|
|
|
|
+import java.io.InputStream;
|
|
|
|
+import java.io.OutputStream;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @author 墨鱼_mo
|
|
|
|
+ * @date 2020-2-5 18:39
|
|
|
|
+ */
|
|
|
|
+public class ItextPDFUtil {
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 斜角排列、全屏多个重复的花式文字水印
|
|
|
|
+ *
|
|
|
|
+ * @param input 需要加水印的PDF读取输入流
|
|
|
|
+ * @param output 输出生成PDF的输出流
|
|
|
|
+ * @param waterMarkString 水印字符
|
|
|
|
+ * @param xAmout x轴重复数量
|
|
|
|
+ * @param yAmout y轴重复数量
|
|
|
|
+ * @param opacity 水印透明度
|
|
|
|
+ * @param rotation 水印文字旋转角度,一般为45度角
|
|
|
|
+ * @param waterMarkFontSize 水印字体大小
|
|
|
|
+ * @param color 水印字体颜色
|
|
|
|
+ */
|
|
|
|
+ public static void stringWaterMark(InputStream input, OutputStream output, String waterMarkString, int xAmout, int yAmout, float opacity, float rotation, int waterMarkFontSize, BaseColor color) {
|
|
|
|
+ try {
|
|
|
|
+
|
|
|
|
+ PdfReader reader = new PdfReader(input);
|
|
|
|
+ PdfStamper stamper = new PdfStamper(reader, output);
|
|
|
|
+
|
|
|
|
+ // 添加中文字体
|
|
|
|
+ BaseFont baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
|
|
|
|
+
|
|
|
|
+ int total = reader.getNumberOfPages() + 1;
|
|
|
|
+
|
|
|
|
+ PdfContentByte over;
|
|
|
|
+ // 给每一页加水印
|
|
|
|
+ for (int i = 1; i < total; i++) {
|
|
|
|
+ Rectangle pageRect = stamper.getReader().getPageSizeWithRotation(i);
|
|
|
|
+ // 计算水印每个单位步长X,Y
|
|
|
|
+ float x = pageRect.getWidth() / xAmout;
|
|
|
|
+ float y = pageRect.getHeight() / yAmout;
|
|
|
|
+
|
|
|
|
+ over = stamper.getOverContent(i);
|
|
|
|
+ PdfGState gs = new PdfGState();
|
|
|
|
+ // 设置透明度为
|
|
|
|
+ gs.setFillOpacity(opacity);
|
|
|
|
+
|
|
|
|
+ over.setGState(gs);
|
|
|
|
+ over.saveState();
|
|
|
|
+
|
|
|
|
+ over.beginText();
|
|
|
|
+ over.setColorFill(color);
|
|
|
|
+ over.setFontAndSize(baseFont, waterMarkFontSize);
|
|
|
|
+
|
|
|
|
+ for (int n = 0; n < xAmout + 1; n++) {
|
|
|
|
+ for (int m = 0; m < yAmout + 1; m++) {
|
|
|
|
+ over.showTextAligned(Element.ALIGN_CENTER, waterMarkString, x * n, y * m, rotation);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ over.endText();
|
|
|
|
+ }
|
|
|
|
+ stamper.close();
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ new Exception("NetAnd PDF add Text Watermark error" + e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public static void addPdfTextMark(String InPdfFile, String outPdfFile, String textMark, int textWidth, int textHeight) throws Exception {
|
|
|
|
+ PdfReader reader = new PdfReader(InPdfFile, "PDF".getBytes());
|
|
|
|
+ PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(new File(outPdfFile)));
|
|
|
|
+ PdfContentByte under;
|
|
|
|
+ BaseFont font = BaseFont.createFont("C:/WINDOWS/Fonts/SIMSUN.TTC,1", "Identity-H", true);// 使用系统字体
|
|
|
|
+ int pageSize = reader.getNumberOfPages();// 原pdf文件的总页数
|
|
|
|
+ for (int i = 1; i <= pageSize; i++) {
|
|
|
|
+ under = stamp.getUnderContent(i);// 水印在之前文本下
|
|
|
|
+ // under = stamp.getOverContent(i);//水印在之前文本上
|
|
|
|
+ under.beginText();
|
|
|
|
+ under.setColorFill(new BaseColor(211, 211, 211));// 文字水印 颜色
|
|
|
|
+ under.setFontAndSize(font, 38);// 文字水印 字体及字号
|
|
|
|
+ under.setTextMatrix(textWidth, textHeight);// 文字水印 起始位置
|
|
|
|
+ under.showTextAligned(Element.ALIGN_CENTER, textMark, textWidth, textHeight, 45);
|
|
|
|
+ under.endText();
|
|
|
|
+ }
|
|
|
|
+ stamp.close();// 关闭
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public static void createPdf(List list)throws Exception{
|
|
|
|
+ //测试pdf保存路径
|
|
|
|
+ String filePath = "C:/Users/Administrator/Desktop/test4.pdf";
|
|
|
|
+ File file = new File(filePath);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //创建文件
|
|
|
|
+ Document document = new Document(PageSize.A4, 80, 80, 30, 20);
|
|
|
|
+ //建立一个书写器
|
|
|
|
+ PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ writer.setPageEvent(new Watermark("PICC"));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 页眉/页脚
|
|
|
|
+ writer.setPageEvent(new MyHeaderFooter());
|
|
|
|
+ //打开文件
|
|
|
|
+ document.open();
|
|
|
|
+ // 4.向文档中添加内容
|
|
|
|
+ new ItextPDFUtil().generatePDF(document);
|
|
|
|
+ //关闭文档
|
|
|
|
+ document.close();
|
|
|
|
+ //关闭书写器
|
|
|
|
+ writer.close();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 定义全局的字体静态变量
|
|
|
|
+ private static Font titlefont;
|
|
|
|
+ private static Font headfont;
|
|
|
|
+ private static Font keyfont;
|
|
|
|
+ private static Font textfont;
|
|
|
|
+ // 最大宽度
|
|
|
|
+ private static int maxWidth = 520;
|
|
|
|
+
|
|
|
|
+ // 静态代码块
|
|
|
|
+ static {
|
|
|
|
+ try {
|
|
|
|
+ // 不同字体(这里定义为同一种字体:包含不同字号、不同style)
|
|
|
|
+
|
|
|
|
+ BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
|
|
|
|
+ titlefont = new Font(bfChinese, 16, Font.BOLD);
|
|
|
|
+ headfont = new Font(bfChinese, 14, Font.BOLD);
|
|
|
|
+ keyfont = new Font(bfChinese, 10, Font.BOLD);
|
|
|
|
+ textfont = new Font(bfChinese, 11, Font.NORMAL);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 生成PDF文件
|
|
|
|
+
|
|
|
|
+ public void generatePDF(Document document) throws Exception {
|
|
|
|
+ Image image1 = Image.getInstance("C:/Users/Administrator/Desktop/picc/logo.png");
|
|
|
|
+ Paragraph p1 = new Paragraph("00000000000001", titlefont);
|
|
|
|
+ //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
|
+ p1.setAlignment(2);
|
|
|
|
+ //设置左缩进
|
|
|
|
+ p1.setIndentationLeft(12);
|
|
|
|
+ p1.setIndentationRight(12); //设置右缩进
|
|
|
|
+ p1.setFirstLineIndent(24); //设置首行缩进
|
|
|
|
+ p1.setLeading(0f); //行间距
|
|
|
|
+ p1.setSpacingBefore(5f); //设置段落上空白
|
|
|
|
+ p1.setSpacingAfter(5f); //设置段落下空白
|
|
|
|
+
|
|
|
|
+ // 直线
|
|
|
|
+ LineSeparator line = new LineSeparator(2f, 110, BaseColor.RED, Element.ALIGN_CENTER, -5f);
|
|
|
|
+
|
|
|
|
+ //段落2
|
|
|
|
+ Paragraph p2 = new Paragraph("雇主责任保险(2015版) 投保单", headfont);
|
|
|
|
+ p2.setAlignment(1);
|
|
|
|
+ p2.setSpacingBefore(5f); //设置段落上空白
|
|
|
|
+ p2.setSpacingAfter(5f); //设置段落下空白
|
|
|
|
+
|
|
|
|
+ //段落3
|
|
|
|
+ Paragraph p3 = new Paragraph("尊敬的投保人:在您填写本投保单前请先详细阅读《中国人民财产保险股份有限公司雇主责任保险条款(2015版)》,阅读条款时请您特别注意条款中的保险责任、责任免除、投保人被保险人义务、赔偿处理等内容并听取保险人就条款(包括前述需特别注意的内容)所作的说明。", textfont);
|
|
|
|
+ p3.setAlignment(0);
|
|
|
|
+ p3.setIndentationLeft(8);
|
|
|
|
+ p3.setFirstLineIndent(24); //设置首行缩进
|
|
|
|
+ p3.setSpacingAfter(10f);
|
|
|
|
+
|
|
|
|
+ //表格
|
|
|
|
+ PdfPTable table = PdfTable.createTable(new float[]{20, 65, 60, 70, 60, 65,120});
|
|
|
|
+ table.addCell(PdfTable.createCell("一、投保人、被保险人信息", textfont, Element.ALIGN_LEFT, 7,1,BaseColor.PINK, true));
|
|
|
|
+ table.addCell(PdfTable.createCell("投保人名称", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("联系电话", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("被保险人信息", textfont, Element.ALIGN_CENTER,1,5,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("名 称", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("营业性质", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("证件类型", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("□组织机构代码证\n" +"□税务登记证\n" +"□工商登记证\n"+"□营业执照", textfont, Element.ALIGN_LEFT,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("证件号码", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("营业范围", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("行业类别", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("雇员人数", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("投保人数", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("联系电话", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("联系地址", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("邮 编", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("近三年损失情况(时间、原因、损失金额)", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,5,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("二、承保信息", textfont, Element.ALIGN_LEFT, 7,1,BaseColor.PINK, true));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("主险", textfont, Element.ALIGN_CENTER,2,7,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("限额名称", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("责任限额/免赔额", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("保险费(元)", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("累计责任限额", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,6,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("每次事故责任限额", textfont, Element.ALIGN_CENTER,1,4,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("每次事故责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("每人伤亡责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("每人医疗费用责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("法律费用责任限额", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("每次事故每人医疗费用免赔额", textfont, Element.ALIGN_CENTER,3,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("附加险", textfont, Element.ALIGN_CENTER,2,4,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("□附加职业病责任保险", textfont, Element.ALIGN_LEFT,4,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell(" ", textfont, Element.ALIGN_CENTER,4,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell(" ", textfont, Element.ALIGN_CENTER,4,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell(" ", textfont, Element.ALIGN_CENTER,4,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_CENTER,1,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("保险费合计(人民币)", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("(大写):\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000(小写):¥ ", textfont, Element.ALIGN_LEFT,5,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("保险期间", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("自\u3000\u3000\u3000年\u3000月\u3000日零时起至\u3000\u3000\u3000年\u3000月\u3000日二十四时止。", textfont, Element.ALIGN_CENTER,5,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("保险合同争议处理", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("□提交______________仲裁委员会仲裁 □诉讼", textfont, Element.ALIGN_LEFT,5,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("司法管辖", textfont, Element.ALIGN_CENTER,2,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("", textfont, Element.ALIGN_LEFT,5,1,BaseColor.WHITE,false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("三、特别约定", textfont, Element.ALIGN_LEFT, 7,1,BaseColor.PINK, true));
|
|
|
|
+ table.addCell(PdfTable.createCell("特别约定", textfont, Element.ALIGN_CENTER, 2,1,BaseColor.WHITE, true));
|
|
|
|
+ table.addCell(PdfTable.createCell("1、发生保险事故后,被保险人必须在24小时内拨打95518电话报案,及时通知保险公司,未及时报案造成的损失和后果由被保险人负责。\n" +
|
|
|
|
+ "2、每次事故每人医疗费用免赔率10%,每次事故误工补贴50元/天,免赔天数3天,最高赔付180天。\n" +
|
|
|
|
+ "3、雇员残疾的,保险人按照《人身保险伤残评定标准》所对应伤残等级的给付比例乘以每人伤亡责任限额赔偿。《人身保险伤残评定标准》指中国保险行业协会发布的人身保险伤残程度评定与保险金给付比例标准,详见《关于印发<人身保险伤残评定标准>的通知》(中保协发【2013】88号)。\n" +
|
|
|
|
+ "4、本标准对功能和残疾进行了分类和分级,将人身保险伤残程度划分为一至十级,最重为第一级,最轻为第十级。与人身保险伤残程度等级相对应的保险金给付比例分为十档,伤残程度第一级对应的保险金给付比例为100%,伤残程度第十级对应的保险金给付比例为10%,每级相差10%。\n" +
|
|
|
|
+ "5、本保险单项下已扩展24小时(即全天候)。无论员工在工作或非工作期间所受意外伤害,我公司均负责赔偿。", textfont, Element.ALIGN_LEFT, new float[]{0,1,1,0},new float[]{5,10},5,1,BaseColor.WHITE, false));
|
|
|
|
+
|
|
|
|
+ table.addCell(PdfTable.createCell("四、投保人声明", textfont, Element.ALIGN_LEFT, 7,1,BaseColor.PINK, true));
|
|
|
|
+ table.addCell(PdfTable.createCell("投保人声明", keyfont, Element.ALIGN_CENTER, 2,2,BaseColor.WHITE, true));
|
|
|
|
+ table.addCell(PdfTable.createCell("\u3000\u3000保险人已向本人提供并详细介绍了中国人民财产保险雇主责任保险条款(2015版),并对其中免除保险人责任的条款(包括但不限于责任免除、投保人被保险人义务、赔偿处理、其他事项等),以及本保险合同中付费约定和特别约定的内容向本人做了明确说明,本人已充分理解并接受上述内容,同意以此作为订立保险合同的依据,自愿投保本保险。\n" +
|
|
|
|
+ "\u3000\u3000本人授权贵公司可以从第三方就有关保险服务事宜查询、收集与本人相关的信息。本人同意贵公司将本人提供的信息、本人接受贵公司保险服务产生的信息以及贵公司从第三方查询、收集的信息(包括本单证签署之前提供、查询收集和产生的),用于人保集团及其因服务必要而委托的第三方,向本人提供服务、推介产品、开展市场调查与信息数据分析。人保集团及其委托的第三方对上述个人信息依法承担保密和信息安全义务。本条中贵公司是指中国人民财产保险股份有限公司,“人保集团”是指中国人民保险集团股份有限公司及其作为控股股东、实际控制人的公司。本授权自本单证签署时生效,具有独立法律效力,不受合同成立与否及效力状态变化的影响。如取消或变更授权,请携带有效证件在办理业务的我公司营业网点办理。\n" +
|
|
|
|
+ "\u3000\u3000上述所填写的内容均属实。", keyfont, Element.ALIGN_LEFT, new float[]{0,1,0,0},new float[]{5,5},5,1,BaseColor.WHITE,false));
|
|
|
|
+ table.addCell(PdfTable.createCell("投保人签名 / 签章:\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000_________年____月____日", textfont, Element.ALIGN_RIGHT, new float[]{0,1,0,1},new float[]{50,5},5,1,BaseColor.WHITE, false));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ PdfPTable table2 = PdfTable.createTable(new float[]{70, 70, 70, 70, 70, 110});
|
|
|
|
+ table2.setSpacingBefore(20F);
|
|
|
|
+ table2.setSpacingAfter(90F);
|
|
|
|
+ table2.addCell(PdfTable.createCell("以下内容由保险公司填写", keyfont, Element.ALIGN_LEFT, new float[]{2,2,2,2},new float[]{0,7},6,1,BaseColor.WHITE, false));
|
|
|
|
+
|
|
|
|
+ PdfPTable table3 = PdfTable.createTable(new float[]{70, 70, 70, 70, 80, 100});
|
|
|
|
+ table3.setSpacingBefore(10F);
|
|
|
|
+ table3.addCell(PdfTable.createCell("业务来源", textfont, Element.ALIGN_LEFT, new float[]{2,0,2,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell(" ", textfont, Element.ALIGN_CENTER, new float[]{0,2,2,0},new float[]{0,7},6,1,BaseColor.WHITE, false));
|
|
|
|
+
|
|
|
|
+ table3.addCell(PdfTable.createCell(" ", textfont, Element.ALIGN_CENTER, new float[]{2,0,0,0},new float[]{0,7},1,2,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("□直接业务", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("□个人代理", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("□电话业务", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("□网上投保", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell(" ", textfont, Element.ALIGN_CENTER, new float[]{0,2,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+
|
|
|
|
+ table3.addCell(PdfTable.createCell("□专业代理", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("□兼业代理", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("□经纪业务", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("名称及代码:", textfont, Element.ALIGN_LEFT, new float[]{0,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("_____________", textfont, Element.ALIGN_LEFT, new float[]{0,2,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+
|
|
|
|
+ table3.addCell(PdfTable.createCell("销售机构:", textfont, Element.ALIGN_LEFT, new float[]{2,0,0,0},new float[]{0,7},1,1,BaseColor.WHITE, false));
|
|
|
|
+ table3.addCell(PdfTable.createCell("__________________________________________________________", textfont, Element.ALIGN_LEFT, new float[]{0,2,0,0},new float[]{0,7},5,1,BaseColor.WHITE, false));
|
|
|
|
+
|
|
|
|
+ table3.addCell(PdfTable.createCell("业务员:___________ 代码:__________ 联系电话:_____________ 日期:______________", textfont, Element.ALIGN_LEFT, new float[]{2,2,0,2},new float[]{0,7},6,1,BaseColor.WHITE, false));
|
|
|
|
+ document.add(image1);
|
|
|
|
+ document.add(p1);
|
|
|
|
+ document.add(line);
|
|
|
|
+ document.add(p2);
|
|
|
|
+ document.add(p3);
|
|
|
|
+ document.add(table);
|
|
|
|
+ document.add(table2);
|
|
|
|
+ document.add(table3);
|
|
|
|
+ document.newPage();
|
|
|
|
+
|
|
|
|
+ Paragraph newP1 = new Paragraph("中国人民财产保险股份有限公司 雇主责任保险(2015版) 投保清单", headfont);
|
|
|
|
+ newP1.setAlignment(1);
|
|
|
|
+ newP1.setSpacingBefore(5f); //设置段落上空白
|
|
|
|
+ newP1.setSpacingAfter(5f); //设置段落下空白
|
|
|
|
+
|
|
|
|
+ Paragraph newP2 = new Paragraph("投保单号:____________________", textfont);
|
|
|
|
+ //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
|
+ newP2.setAlignment(2);
|
|
|
|
+ newP2.setSpacingBefore(10F);
|
|
|
|
+
|
|
|
|
+ PdfPTable table4 = PdfTable.createTable(new float[]{30, 50, 50, 110, 30, 30,80,80});
|
|
|
|
+ table4.setSpacingBefore(10F);
|
|
|
|
+ table4.addCell(PdfTable.createCell("序号", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell("姓名", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell("证件类型", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell("证件号码", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell("性别", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell("年龄", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell("岗位/工种", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell("健康情况", textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+
|
|
|
|
+ List list = new ArrayList();
|
|
|
|
+ for (int i =0;i<list.size();i++){
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ table4.addCell(PdfTable.createCell(list.get(i).toString(), textfont, Element.ALIGN_CENTER, 1,1,BaseColor.WHITE, true));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ document.add(image1);
|
|
|
|
+ document.add(line);
|
|
|
|
+ document.add(newP1);
|
|
|
|
+ document.add(newP2);
|
|
|
|
+ document.add(table4);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|