JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".x.html");
JRXhtmlExporter exporter = new JRXhtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
//exporter.setParameter(JRHtmlExporterParameter.ZOOM_RATIO, new Float(3f));
exporter.exportReport();
System.err.println("Report : " + sourceFile + ". XHTML export time : " + (System.currentTimeMillis() - start));
}
}