|
@@ -183,7 +183,7 @@ public class PDFUtil {
|
|
|
document.addCreator("");// 创建者
|
|
|
|
|
|
// 4.向文档中添加内容
|
|
|
- PDFUtil.generatePDF(document);
|
|
|
+ PDFUtil.generateEPDF(document,"XXX公司");
|
|
|
|
|
|
// 5.关闭文档
|
|
|
document.close();
|
|
@@ -279,7 +279,7 @@ public class PDFUtil {
|
|
|
table.addCell(createCell("cg000005", textfont));
|
|
|
table.addCell(createCell("100000", textfont));
|
|
|
table.addCell(createCell("2020-08-13", textfont));
|
|
|
-// document.add(table);
|
|
|
+ document.add(table);
|
|
|
|
|
|
table = createTable(new float[] { 80, 80, 80, 80, 80, 80 ,80});
|
|
|
table.addCell(createCell("明细名称", keyfont, Element.ALIGN_CENTER));
|
|
@@ -298,7 +298,7 @@ public class PDFUtil {
|
|
|
table.addCell(createCell("适配", textfont));
|
|
|
table.addCell(createCell("2020-08-13",textfont));
|
|
|
|
|
|
-// document.add(table);
|
|
|
+// document.add(table);
|
|
|
document.add(p1);
|
|
|
|
|
|
paragraph = new Paragraph("中标供应商信息", titlefont);
|
|
@@ -311,120 +311,7 @@ public class PDFUtil {
|
|
|
paragraph.setSpacingAfter(10f); //设置段落下空白
|
|
|
// document.add(paragraph);
|
|
|
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("测试供应商", textfont));
|
|
|
- table.addCell(createCell("张三", textfont));
|
|
|
- table.addCell(createCell("8337971871", textfont));
|
|
|
- table.addCell(createCell("langss@dgtis.com", textfont));
|
|
|
-// document.add(table);
|
|
|
-
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已报价", textfont));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已作废", textfont));
|
|
|
-// document.add(table);
|
|
|
-// document.add(p3);
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("测试供应商", textfont));
|
|
|
- table.addCell(createCell("张三", textfont));
|
|
|
- table.addCell(createCell("8337971871", textfont));
|
|
|
- table.addCell(createCell("langss@dgtis.com", textfont));
|
|
|
-// document.add(table);
|
|
|
-
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已报价", textfont));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已作废", textfont));
|
|
|
-// document.add(table);
|
|
|
-
|
|
|
- document.add(p1);//添加实线
|
|
|
-
|
|
|
- paragraph = new Paragraph("未中标供应商信息", titlefont);
|
|
|
- paragraph.setAlignment(0); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
- paragraph.setIndentationLeft(12); //设置左缩进
|
|
|
- paragraph.setIndentationRight(12); //设置右缩进
|
|
|
- paragraph.setFirstLineIndent(24); //设置首行缩进
|
|
|
- paragraph.setLeading(20f); //行间距
|
|
|
- paragraph.setSpacingBefore(5f); //设置段落上空白
|
|
|
- paragraph.setSpacingAfter(10f); //设置段落下空白
|
|
|
- document.add(paragraph);
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("测试供应商", textfont));
|
|
|
- table.addCell(createCell("张三", textfont));
|
|
|
- table.addCell(createCell("8337971871", textfont));
|
|
|
- table.addCell(createCell("langss@dgtis.com", textfont));
|
|
|
-// document.add(table);
|
|
|
-
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已报价", textfont));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已作废", textfont));
|
|
|
-// document.add(table);
|
|
|
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("供应商名称", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系人", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("联系方式", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("邮箱", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("测试供应商", textfont));
|
|
|
- table.addCell(createCell("张三", textfont));
|
|
|
- table.addCell(createCell("8337971871", textfont));
|
|
|
- table.addCell(createCell("langss@dgtis.com", textfont));
|
|
|
-// document.add(table);
|
|
|
- document.add(p3);
|
|
|
- table = createTable(new float[] { 80, 80, 80, 80});
|
|
|
- table.addCell(createCell("报价编号", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("总价", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("报价时间", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("状态", keyfont, Element.ALIGN_CENTER));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已报价", textfont));
|
|
|
- table.addCell(createCell("P20200812104", textfont));
|
|
|
- table.addCell(createCell("70000.0", textfont));
|
|
|
- table.addCell(createCell("2020-08-12", textfont));
|
|
|
- table.addCell(createCell("已作废", textfont));
|
|
|
-// document.add(table);
|
|
|
}
|
|
|
|
|
|
// 生成PDF文件
|