// Create a pdf file stream FileOutputStream outputStream = null; try { outputStream = new FileOutputStream("SaveMultipleWorkbooksToPDF.pdf"); } catch (FileNotFoundException e) { e.printStackTrace(); } // Create a new workbook Workbook workbook = new Workbook(); workbook.open(this.getResourceStream("xlsx/Any year calendar1.xlsx")); Workbook workbook2 = new Workbook(); workbook2.open(this.getResourceStream("xlsx/Any year calendar (Ion theme)1.xlsx")); //Create a PrintManager. PrintManager printManager = new PrintManager(); //Save the workbook1 and workbook2 into one pdf file. List workbooks = new ArrayList(); workbooks.add(workbook); workbooks.add(workbook2); printManager.saveWorkbooksToPDF(outputStream, workbooks); // Close the file stream try { outputStream.close(); } catch (IOException e) { e.printStackTrace(); }