148149150151152153154155156157158
output.setContentType(ReportEngineOutput.CONTENT_TYPE_RTF); RTFProcessor pr = new RTFProcessor(jfreeReport); pr.setStrictLayout(false); pr.setOutputStream(out); pr.processReport(); } else //default to HTML { output.setContentType(ReportEngineOutput.CONTENT_TYPE_HTML);
158159160161162163164165166167168
HtmlProcessor pr = new HtmlProcessor(jfreeReport); pr.setStrictLayout(false); pr.setGenerateXHTML(true); pr.setFilesystem(new StreamHtmlFilesystem(out)); pr.processReport(); } output.setContent(out.toByteArray()); return output;