I hope someone can help me, I am trying to merge several PDFs into a single file but I only upload the files to an existing file. I would like to have it printed on a new website of my application. I have been using this line of code
JasperExportManager.exportReportToPdfStream (jp1, outStream); for a single file.
How could I do to join several pdf? I would greatly appreciate your comments ....
So I have my code so far
for (int i = 0; i < algo.length; i++) {
results.put("EVALUATION_NUMBER", Integer.parseInt(algo[i]));
LOG.info("All Generated PDF");
jr = JasperCompileManager.compileReport(report);
jasperPrint = JasperFillManager.fillReport(jr, results, con);
jasperPrintList.add(jasperPrint);
System.out.println(jasperPrintList.get(i));
List<JRPrintPage> pages = jasperPrintList.get(i).getPages();
JasperPrint jp1 = new JasperPrint();
for (int j = 0; j < pages.size(); j++) {
JRPrintPage object = pages.get(j);
jp1.addPage(object);
}