2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: roberto71 - roberto71 Export Report To Pdf 2004-12-01 23:51 When i use exportReportToPdf on JasperExportManager all works fine, so i have the byte[] result. but when i write this byte[] in the outputstream in tha caller servler, Adobe PDF browser doens't start inside the browser; if i disable to start adobe pdf in browser instead, the reader starts. in my servlet i have: response.setContentType("application/pdf"); response.setContentLength(aPageData.length); response.setBufferSize(aPageData.length); response.getOutputStream().write(aPageData); response.getOutputStream().flush(); where aPageData is the results of JasperExportManager.exportReportToPdf(aJasperPrint); Using a byte[] generated from another report engine all works fine instead (with the same machine: Jboss 3.2.6, jdk 1.4.2_06, IE 6.0xx SP2) Any idea ? Thank You By: Eu Gene - eglim RE: Export Report To Pdf 2004-12-02 00:03 Why don't you use JasperExportManager.exportReportToPdfStream? It works for me. JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream()); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now