Jelajahi Sumber

签到表对齐方式

caozixuan 2 tahun lalu
induk
melakukan
69fb721a5e

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

@@ -243,11 +243,11 @@ public class CreatePrintPdfUtil {
             document.add(blank);
 
             // 基础信息表格
-            PdfPTable basicTable = PdfFillUtils.createTable(new float[]{30, 70});
+            PdfPTable basicTable = PdfFillUtils.createTable(new float[]{20, 80});
             List<Map<String, String>> basicPlate = pdfPackageDto.getBasicPlate();
             for (Map<String, String> stringMap : basicPlate) {
-                basicTable.addCell(PdfFillUtils.createCell(stringMap.get("name") + ":", PdfFillUtils.textFont24, 50f, Element.ALIGN_RIGHT, 18f));
-                basicTable.addCell(PdfFillUtils.createCell(stringMap.get("value"), PdfFillUtils.textFont24, 50f, Element.ALIGN_LEFT, 18f));
+                basicTable.addCell(PdfFillUtils.createCell(stringMap.get("name"), PdfFillUtils.textFont24, 50f, Element.ALIGN_JUSTIFIED_ALL, 0f));
+                basicTable.addCell(PdfFillUtils.createCell(": " + stringMap.get("value"), PdfFillUtils.textFont24, 50f, Element.ALIGN_LEFT, 0f));
             }
             document.add(basicTable);
             document.add(blank);