Przeglądaj źródła

3.2.1-印品改字体

xiaof 2 lat temu
rodzic
commit
e9d460dcc6

+ 6 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePrintPdfUtil.java

@@ -152,7 +152,7 @@ public class CreatePrintPdfUtil {
             int j = 0;
             for (Map.Entry<String, String> entry : studentHeadPlate.entrySet()) {
                 headKeys[columnCount * i + j] = entry.getKey();
-                studentTable.addCell(PdfFillUtils.createCell(entry.getValue(), PdfFillUtils.textFont12, BaseColor.GRAY, 16f, Element.ALIGN_CENTER, 0, 1, 1));
+                studentTable.addCell(PdfFillUtils.createCell(entry.getValue(), PdfFillUtils.textFont12, BaseColor.LIGHT_GRAY, 16f, Element.ALIGN_CENTER, 0, 1, 1));
                 j++;
             }
         }
@@ -252,10 +252,10 @@ public class CreatePrintPdfUtil {
             Image code128Image = PdfFillUtils.createBarcode(pdfWriter, pdfPackageDto.getPackageNumber(), false, null, null);
             code128Image.scalePercent(100);
             titleTable.setPaddingTop(1);
-            titleTable.addCell(PdfFillUtils.createCell("", null, null, 40f, Element.ALIGN_CENTER, 15, 1, 1));
+            titleTable.addCell(PdfFillUtils.createCell("", null, null, 30f, Element.ALIGN_CENTER, 15, 1, 1));
             titleTable.addCell(PdfFillUtils.createCell(code128Image, 30f, Element.ALIGN_CENTER, 15, 1, 1));
 
-            titleTable.addCell(PdfFillUtils.createCell(pdfPackageDto.getTitle(), PdfFillUtils.textFont22, null, 50f, Element.ALIGN_CENTER, 15, 1, 2));
+            titleTable.addCell(PdfFillUtils.createCell(pdfPackageDto.getTitle(), PdfFillUtils.textFont22, null, 35f, Element.ALIGN_CENTER, 15, 1, 2));
 
             List<Map<String, String>> titlePlate = pdfPackageDto.getTitlePlate();
             for (Map<String, String> stringMap : titlePlate) {
@@ -267,11 +267,13 @@ public class CreatePrintPdfUtil {
 
             document.add(titleTable);
             document.add(blank);
+            document.add(blank);
 
             // 基础信息表格
-            PdfPTable basicTable = PdfFillUtils.createTable(new float[]{24, 3, 73});
+            PdfPTable basicTable = PdfFillUtils.createTable(new float[]{3, 15, 3, 79});
             List<Map<String, String>> basicPlate = pdfPackageDto.getBasicPlate();
             for (Map<String, String> stringMap : basicPlate) {
+                basicTable.addCell(PdfFillUtils.createCell("", PdfFillUtils.textFont14, 50f, Element.ALIGN_JUSTIFIED_ALL, 0f));
                 basicTable.addCell(PdfFillUtils.createCell(stringMap.get("name"), PdfFillUtils.textFont14, 50f, Element.ALIGN_JUSTIFIED_ALL, 0f));
                 basicTable.addCell(PdfFillUtils.createCell(": ", PdfFillUtils.textFont14, 50f, Element.ALIGN_JUSTIFIED_ALL, 0f));
                 basicTable.addCell(PdfFillUtils.createCell(stringMap.get("value"), PdfFillUtils.textFont14, 50f, Element.ALIGN_LEFT, 0f));