Commit a6e4473f authored by 盖献康's avatar 盖献康

Merge branch 'gaixiankang' into 'dev'

检验报告PDF - 模板更新

See merge request !258
parents e1a7a1c6 f2b4cb20
......@@ -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);
document.addContent(signTable);
document.setParagraph("7.附录", 10.5f, Element.ALIGN_LEFT, 45,1f, 0f);
document.setParagraph("图 1 样品照片", 10.5f, Element.ALIGN_CENTER, 0,20f, 0f);
document.setParagraph("7.附录", 10.5f, Element.ALIGN_LEFT, 45,1f, 10f);
// 添加内容到新页面
PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25});
pictureTable.setWidthPercentage(90);
......@@ -168,6 +167,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
pictureTable.addCell(cell);
}
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);
// 关闭PDF
document.close();
......@@ -348,13 +348,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
}
// 图片域
// 样品
String url = inspectionReportPdfVO.getBrandImage();
if (StrUtil.isNotBlank(url)) {
if (url.startsWith(",")) {
url = inspectionReportPdfVO.getBrandImage().substring(1);
}
addImageToPdf("brand", fields, ps, "http://49.232.167.247:22038" + url.split(",")[0]);
}
// String url = inspectionReportPdfVO.getBrandImage();
// if (StrUtil.isNotBlank(url)) {
// if (url.startsWith(",")) {
// url = inspectionReportPdfVO.getBrandImage().substring(1);
// }
// 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