| | |
| | | throw new IllegalArgumentException("订单列表不能为空"); |
| | | } |
| | | |
| | | String fileName = "行程单_" + UUID.randomUUID() + ".pdf"; |
| | | String fileName = "贵人家园行程单_" + UUID.randomUUID() + ".pdf"; |
| | | String filePath = pdfDir + fileName; |
| | | File file = new File(filePath); |
| | | FileUtils.forceMkdirParent(file); |
| | |
| | | table.addCell(cell); |
| | | } |
| | | |
| | | private void addTableCell(PdfPTable table, String text, Font font) { |
| | | PdfPCell cell = new PdfPCell(new Paragraph(text != null ? text : "", font)); |
| | | cell.setPadding(5); |
| | | table.addCell(cell); |
| | | } |
| | | |
| | | /** |
| | | * 获取中文字体,优先自定义字体,fallback到 CJK 内置 |