jasper « PDF file « Java I/O Q&A





1. Cannot export PDF File (Jasper reprting)    coderanch.com

public class Main { String reportSource = "./report/payment_report.jrxml"; String reportDest = "./report/Hello.pdf"; public static void main(String[] args) { Main m = new Main(); try { m.add(); } catch (JRException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } } public void add() throws JRException { Map param = new HashMap(); JasperReport jr = JasperCompileManager.compileReport(reportSource); JasperPrint jp = JasperFillManager.fillReport(jr, param, new JREmptyDataSource()); JasperExportManager.exportReportToPdfFile(jp, ...