|
|
@@ -288,73 +288,49 @@ public class PdfUtil {
|
|
|
createPDFCell(tableFont, table, data.get("inTime").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
createPDFCell(tableFont, table, "离开时间", Element.ALIGN_CENTER, 1, 1);
|
|
|
createPDFCell(tableFont, table, data.get("outTime").toString(), Element.ALIGN_CENTER, 2, 1);
|
|
|
-
|
|
|
- //第八行
|
|
|
- createPDFCell(tableFont, table, "来访原由", Element.ALIGN_CENTER, 1, 40);
|
|
|
- //createPDFCellWithoutBorder(tableFont, table, "来访原由:" + data.get("imageFile").toString() + " ;", Element.ALIGN_LEFT, 6, 1);
|
|
|
-
|
|
|
-/*
|
|
|
-
|
|
|
- //预设案由
|
|
|
- PdfPCell contentCell = new PdfPCell();
|
|
|
- contentCell.setColspan(6);
|
|
|
- Paragraph content = new Paragraph();
|
|
|
- String text = data.get("presetCase").toString();
|
|
|
- content.add(new Chunk(text, tableFont));
|
|
|
- contentCell.addElement(content);
|
|
|
- contentCell.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
- table.addCell(contentCell);
|
|
|
-
|
|
|
- //演练情况
|
|
|
- PdfPCell noteCell = new PdfPCell();
|
|
|
- noteCell.setColspan(6);
|
|
|
- Paragraph paragraph = new Paragraph();
|
|
|
- String noteText = data.get("drillSituation").toString();
|
|
|
- paragraph.add(new Chunk(noteText, tableFont));
|
|
|
- noteCell.addElement(paragraph);
|
|
|
- noteCell.setBorder(Rectangle.LEFT | Rectangle.RIGHT);
|
|
|
- table.addCell(noteCell);
|
|
|
+// /statics/2023/12/05/20231205183106A001.png
|
|
|
+ //证件图片
|
|
|
+ createPDFCell(tableFont, table, "证件图片", Element.ALIGN_CENTER, 1, 70);
|
|
|
//演练情况 图片填充
|
|
|
- final PdfPTable imageTable1 = getImage((List<String>) data.get("imageData"), 6,100,100,3);
|
|
|
+ final PdfPTable imageTable1 = getImage((List<String>) data.get("imageFile"), 10,80,80,4);
|
|
|
final PdfPCell cell1 = new PdfPCell();
|
|
|
cell1.setNoWrap(false);
|
|
|
cell1.setPaddingLeft(8f);
|
|
|
cell1.setPaddingRight(8f);
|
|
|
cell1.setPaddingBottom(8f);
|
|
|
cell1.setPaddingTop(8f);
|
|
|
- cell1.setColspan(6);
|
|
|
- cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
+ cell1.setColspan(5);
|
|
|
+ cell1.setRowspan(70);
|
|
|
+ //cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
cell1.addElement(imageTable1);
|
|
|
table.addCell(cell1);
|
|
|
+ createPDFCell(tableFont, table, "介绍信附件", Element.ALIGN_CENTER, 1, 70);
|
|
|
+ final PdfPTable imageTable2 = getImage((List<String>) data.get("imageFile"), 10,80,80,4);
|
|
|
+ final PdfPCell cell2 = new PdfPCell();
|
|
|
+ cell2.setNoWrap(false);
|
|
|
+ cell2.setPaddingLeft(8f);
|
|
|
+ cell2.setPaddingRight(8f);
|
|
|
+ cell2.setPaddingBottom(8f);
|
|
|
+ cell2.setPaddingTop(8f);
|
|
|
+ cell2.setColspan(5);
|
|
|
+ cell2.setRowspan(70);
|
|
|
+ //cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
+ cell2.addElement(imageTable2);
|
|
|
+ table.addCell(cell2);
|
|
|
+ createPDFCell(tableFont, table, "身份核验材料", Element.ALIGN_CENTER, 1, 70);
|
|
|
+ final PdfPTable imageTable3 = getImage((List<String>) data.get("imageFile"), 10,80,80,4);
|
|
|
+ final PdfPCell cell3 = new PdfPCell();
|
|
|
+ cell3.setNoWrap(false);
|
|
|
+ cell3.setPaddingLeft(8f);
|
|
|
+ cell3.setPaddingRight(8f);
|
|
|
+ cell3.setPaddingBottom(8f);
|
|
|
+ cell3.setPaddingTop(8f);
|
|
|
+ cell3.setColspan(5);
|
|
|
+ cell3.setRowspan(70);
|
|
|
+ //cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
+ cell3.addElement(imageTable3);
|
|
|
+ table.addCell(cell3);
|
|
|
|
|
|
- //签字区域
|
|
|
- PdfPCell signCell = new PdfPCell();
|
|
|
- signCell.setColspan(6);
|
|
|
- Paragraph signParagraph = new Paragraph();
|
|
|
- signParagraph.add(new Chunk("参会演练人员(签字):", tableFont));
|
|
|
- signCell.addElement(signParagraph);
|
|
|
- signCell.setBorder(Rectangle.LEFT | Rectangle.RIGHT);
|
|
|
- table.addCell(signCell);
|
|
|
- //图片填充
|
|
|
- final PdfPTable imageTable = getImage((List<String>) data.get("image"), 12,50,50,5);
|
|
|
- final PdfPCell cell = new PdfPCell();
|
|
|
- cell.setNoWrap(false);
|
|
|
- cell.setPaddingLeft(8f);
|
|
|
- cell.setPaddingRight(8f);
|
|
|
- cell.setPaddingBottom(8f);
|
|
|
- cell.setPaddingTop(8f);
|
|
|
- cell.setColspan(6);
|
|
|
- cell.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
|
|
|
- cell.addElement(imageTable);
|
|
|
- table.addCell(cell);
|
|
|
-
|
|
|
- //第三行
|
|
|
- createPDFCell(tableFont, table, "记录人", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("recorderName").toString(), Element.ALIGN_CENTER, 5, 1);
|
|
|
-
|
|
|
- *//* //第三行
|
|
|
- createPDFCell(tableFont, table, "参会人员签字", Element.ALIGN_CENTER, 1, 1);
|
|
|
- createPDFCell(tableFont, table, data.get("users").toString(), Element.ALIGN_CENTER, 5, 1);*/
|
|
|
|
|
|
document.add(table);
|
|
|
}
|