元件download位置:https://pdfbox.apache.org/ import org.apache.pdfbox.multipdf.PDFMergerUtility; if (fileEntry.getName().indexOf(ymd) > -1) { combinePdf(sourcePath + "//" + fileEntry.getName(), destPath + "//" + fileEntry.getName() + "//"); } public static void combinePdf(String sourcePath, String destPath) { try { PDFMergerUtility mergePdf = new PDFMergerUtility(); String folder = sourcePath; File _folder = new File(folder); File[] filesInFolder; filesInFolder = _folder.listFiles(); for (File string : filesInFolder) { log.info("pdf fileName=" + string); if (!string.isDirectory()) { mergePdf.addSource(string); } } mergePdf.setDestinationFileName(destPath + ymd + ".pdf");