|
@@ -118,8 +118,8 @@ public class CreatePrintPdfUtil {
|
|
Paragraph blank = new Paragraph(" ");
|
|
Paragraph blank = new Paragraph(" ");
|
|
// 标题table
|
|
// 标题table
|
|
PdfPTable titleTable = PdfFillUtils.createTable(new float[]{33, 34, 33});
|
|
PdfPTable titleTable = PdfFillUtils.createTable(new float[]{33, 34, 33});
|
|
- titleTable.addCell(PdfFillUtils.createCell("", null, null, 50f, Element.ALIGN_CENTER, 15, 3, 1));
|
|
|
|
- titleTable.addCell(PdfFillUtils.createCell(pdfFillDto.getTitle(), PdfFillUtils.textFont14, null, 50f, Element.ALIGN_CENTER, 15, 3, 1));
|
|
|
|
|
|
+ titleTable.addCell(PdfFillUtils.createCell("", null, null, Element.ALIGN_CENTER, 15, 3, 1));
|
|
|
|
+ titleTable.addCell(PdfFillUtils.createCell(pdfFillDto.getTitle(), PdfFillUtils.textFont14, null, Element.ALIGN_CENTER, 15, 3, 1));
|
|
// 条码
|
|
// 条码
|
|
Image code128Image = PdfFillUtils.createBarcode(pdfWriter, pdfFillDto.getPackageNumber(), false, null, null);
|
|
Image code128Image = PdfFillUtils.createBarcode(pdfWriter, pdfFillDto.getPackageNumber(), false, null, null);
|
|
code128Image.scalePercent(100);
|
|
code128Image.scalePercent(100);
|
|
@@ -131,10 +131,10 @@ public class CreatePrintPdfUtil {
|
|
PdfPTable basicTable = PdfFillUtils.createTable(6);
|
|
PdfPTable basicTable = PdfFillUtils.createTable(6);
|
|
List<Map<String, String>> basicPlate = pdfFillDto.getBasicPlate();
|
|
List<Map<String, String>> basicPlate = pdfFillDto.getBasicPlate();
|
|
for (Map<String, String> stringMap : basicPlate) {
|
|
for (Map<String, String> stringMap : basicPlate) {
|
|
- basicTable.addCell(PdfFillUtils.createCell(stringMap.get("name") + ":" + stringMap.get("value"), PdfFillUtils.textFont11, null, 22f, Element.ALIGN_LEFT, 0, 1, 3));
|
|
|
|
|
|
+ basicTable.addCell(PdfFillUtils.createCell(stringMap.get("name") + ":" + stringMap.get("value"), PdfFillUtils.textFont11, null, Element.ALIGN_LEFT, 0, 1, 3));
|
|
}
|
|
}
|
|
if (basicPlate.size() % 2 > 0) {
|
|
if (basicPlate.size() % 2 > 0) {
|
|
- basicTable.addCell(PdfFillUtils.createCell(" ", PdfFillUtils.textFont11, null, 22f, Element.ALIGN_LEFT, 0, 1, 3));
|
|
|
|
|
|
+ basicTable.addCell(PdfFillUtils.createCell(" ", PdfFillUtils.textFont11, null, Element.ALIGN_LEFT, 0, 1, 3));
|
|
}
|
|
}
|
|
document.add(basicTable);
|
|
document.add(basicTable);
|
|
|
|
|
|
@@ -159,7 +159,7 @@ public class CreatePrintPdfUtil {
|
|
if ("座位号".equals(value)) {
|
|
if ("座位号".equals(value)) {
|
|
value = "座号";
|
|
value = "座号";
|
|
}
|
|
}
|
|
- studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont11, BaseColor.LIGHT_GRAY, 22f, Element.ALIGN_CENTER, 0, 1, 1));
|
|
|
|
|
|
+ studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont11, BaseColor.LIGHT_GRAY, Element.ALIGN_CENTER, 0, 1, 1));
|
|
j++;
|
|
j++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -173,19 +173,19 @@ public class CreatePrintPdfUtil {
|
|
Map<String, String> stringMap1 = studentPlate.get(2 * i);
|
|
Map<String, String> stringMap1 = studentPlate.get(2 * i);
|
|
for (int j = 0; j < stringMap1.size(); j++) {
|
|
for (int j = 0; j < stringMap1.size(); j++) {
|
|
String value = stringMap1.get(headKeys[j]);
|
|
String value = stringMap1.get(headKeys[j]);
|
|
- studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
|
|
|
|
|
|
+ studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, Element.ALIGN_CENTER, 0, 1, 1));
|
|
}
|
|
}
|
|
|
|
|
|
if (studentPlateCount % 2 > 0 && 2 * i + 1 == studentPlate.size()) {
|
|
if (studentPlateCount % 2 > 0 && 2 * i + 1 == studentPlate.size()) {
|
|
for (int i1 = 0; i1 < columnCount; i1++) {
|
|
for (int i1 = 0; i1 < columnCount; i1++) {
|
|
- studentTable.addCell(PdfFillUtils.createCell("", PdfFillUtils.textFont11, null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
|
|
|
|
|
|
+ studentTable.addCell(PdfFillUtils.createCell("", PdfFillUtils.textFont11, null, Element.ALIGN_CENTER, 0, 1, 1));
|
|
}
|
|
}
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
Map<String, String> stringMap2 = studentPlate.get(2 * i + 1);
|
|
Map<String, String> stringMap2 = studentPlate.get(2 * i + 1);
|
|
for (int j = 0; j < stringMap2.size(); j++) {
|
|
for (int j = 0; j < stringMap2.size(); j++) {
|
|
String value = stringMap2.get(headKeys[j + columnCount]);
|
|
String value = stringMap2.get(headKeys[j + columnCount]);
|
|
- studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j + columnCount]), null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
|
|
|
|
|
|
+ studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j + columnCount]), null, Element.ALIGN_CENTER, 0, 1, 1));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -199,7 +199,7 @@ public class CreatePrintPdfUtil {
|
|
if ("座位号".equals(value)) {
|
|
if ("座位号".equals(value)) {
|
|
value = "座号";
|
|
value = "座号";
|
|
}
|
|
}
|
|
- studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont11, BaseColor.LIGHT_GRAY, 22f, Element.ALIGN_CENTER, 0, 1, 1));
|
|
|
|
|
|
+ studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont11, BaseColor.LIGHT_GRAY, Element.ALIGN_CENTER, 0, 1, 1));
|
|
k++;
|
|
k++;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -211,7 +211,7 @@ public class CreatePrintPdfUtil {
|
|
Map<String, String> stringMap1 = studentPlate.get(i);
|
|
Map<String, String> stringMap1 = studentPlate.get(i);
|
|
for (int j = 0; j < stringMap1.size(); j++) {
|
|
for (int j = 0; j < stringMap1.size(); j++) {
|
|
String value = stringMap1.get(headKeys[j]);
|
|
String value = stringMap1.get(headKeys[j]);
|
|
- studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
|
|
|
|
|
|
+ studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, Element.ALIGN_CENTER, 0, 1, 1));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -295,16 +295,16 @@ public class CreatePrintPdfUtil {
|
|
Image code128Image = PdfFillUtils.createBarcode(pdfWriter, pdfPackageDto.getPackageNumber(), false, null, null);
|
|
Image code128Image = PdfFillUtils.createBarcode(pdfWriter, pdfPackageDto.getPackageNumber(), false, null, null);
|
|
code128Image.scalePercent(100);
|
|
code128Image.scalePercent(100);
|
|
titleTable.setPaddingTop(1);
|
|
titleTable.setPaddingTop(1);
|
|
- titleTable.addCell(PdfFillUtils.createCell("", null, null, 30f, Element.ALIGN_CENTER, 15, 1, 1));
|
|
|
|
|
|
+ titleTable.addCell(PdfFillUtils.createCell("", null, null, Element.ALIGN_CENTER, 15, 1, 1));
|
|
titleTable.addCell(PdfFillUtils.createCell(code128Image, 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, 35f, Element.ALIGN_CENTER, 15, 1, 2));
|
|
|
|
|
|
+ titleTable.addCell(PdfFillUtils.createCell(pdfPackageDto.getTitle(), PdfFillUtils.textFont22, null, Element.ALIGN_CENTER, 15, 1, 2));
|
|
|
|
|
|
List<Map<String, String>> titlePlate = pdfPackageDto.getTitlePlate();
|
|
List<Map<String, String>> titlePlate = pdfPackageDto.getTitlePlate();
|
|
for (Map<String, String> stringMap : titlePlate) {
|
|
for (Map<String, String> stringMap : titlePlate) {
|
|
String value = stringMap.get("value");
|
|
String value = stringMap.get("value");
|
|
if (StringUtils.isNotBlank(value)) {
|
|
if (StringUtils.isNotBlank(value)) {
|
|
- titleTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont16, null, 30f, Element.ALIGN_CENTER, 15, 1, 2));
|
|
|
|
|
|
+ titleTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont16, null, Element.ALIGN_CENTER, 15, 1, 2));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|