Commit 14da8aa5 authored by 盖献康's avatar 盖献康

检验报告PDF - 模板更新

parent 2d53186f
...@@ -140,8 +140,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -140,8 +140,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
document.writeBottomCell("共 10 页", Element.ALIGN_RIGHT, 1, 1, signTable).setRightIndent(30f); document.writeBottomCell("共 10 页", Element.ALIGN_RIGHT, 1, 1, signTable).setRightIndent(30f);
document.writeBottomCell("第 10 页", Element.ALIGN_RIGHT, 1, 1, signTable); document.writeBottomCell("第 10 页", Element.ALIGN_RIGHT, 1, 1, signTable);
document.addContent(signTable); document.addContent(signTable);
document.setParagraph("7.附录", 10.5f, Element.ALIGN_LEFT, 45,1f, 0f); document.setParagraph("7.附录", 10.5f, Element.ALIGN_LEFT, 45,1f, 10f);
document.setParagraph("图 1 样品照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f);
// 添加内容到新页面 // 添加内容到新页面
PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25}); PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25});
pictureTable.setWidthPercentage(90); pictureTable.setWidthPercentage(90);
...@@ -168,6 +167,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -168,6 +167,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
pictureTable.addCell(cell); pictureTable.addCell(cell);
} }
document.addContent(pictureTable); document.addContent(pictureTable);
document.setParagraph("图 1 样品照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f);
document.setParagraph("图 2 试验照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f); document.setParagraph("图 2 试验照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f);
// 关闭PDF // 关闭PDF
document.close(); document.close();
...@@ -348,13 +348,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -348,13 +348,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
} }
// 图片域 // 图片域
// 样品 // 样品
String url = inspectionReportPdfVO.getBrandImage(); // String url = inspectionReportPdfVO.getBrandImage();
if (StrUtil.isNotBlank(url)) { // if (StrUtil.isNotBlank(url)) {
if (url.startsWith(",")) { // if (url.startsWith(",")) {
url = inspectionReportPdfVO.getBrandImage().substring(1); // url = inspectionReportPdfVO.getBrandImage().substring(1);
} // }
addImageToPdf("brand", fields, ps, "http://49.232.167.247:22038" + url.split(",")[0]); // addImageToPdf("brand", fields, ps, "http://49.232.167.247:22038" + url.split(",")[0]);
} // }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment