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

PDF - 企业留档文件(修改)

parent 545fa439
...@@ -121,6 +121,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -121,6 +121,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
// 内容 // 内容
// 封面 // 封面
document.setParagraph("检验中心名称", 12f, 0, 60,15f, 120f); document.setParagraph("检验中心名称", 12f, 0, 60,15f, 120f);
document.setParagraph("企业留档文件", 30f, Element.ALIGN_CENTER, 0,15f, 180f);
PdfPTable customTable = new PdfPTable(new float[]{15, 50}); PdfPTable customTable = new PdfPTable(new float[]{15, 50});
customTable.setWidthPercentage(70); customTable.setWidthPercentage(70);
document.writeNoBorderCell("检验依据:", Element.ALIGN_LEFT, 1, 1, customTable); document.writeNoBorderCell("检验依据:", Element.ALIGN_LEFT, 1, 1, customTable);
......
...@@ -48,11 +48,10 @@ public class PdfTemplateManagementController { ...@@ -48,11 +48,10 @@ public class PdfTemplateManagementController {
@ApiOperation("企业留档文件PDF下载") @ApiOperation("企业留档文件PDF下载")
@GetMapping(value = "/retentionFile", produces = "application/json") @GetMapping(value = "/retentionFile", produces = "application/json")
public R<String> downloadRetentionFile() { public R<String> downloadRetentionFile() {
// response.setHeader("content-disposition","attachment;fileName="+"RetentionFile.pdf");
try { try {
// demo-模板 // demo-模板
String s = pdfTemplateManagementService.generateRetentionFile(); String url = pdfTemplateManagementService.generateRetentionFile();
return R.ok(s); return R.ok(url);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return R.fail(); return R.fail();
......
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