pajarokillo Posted September 27, 2006 Share Posted September 27, 2006 Hi!, i'm working with jasperreports-1.2.1 library, and i have developed a report that works fine with Acrobat 7.0 but with Acrobat 6.0 it don't work. Somebody knows the problem?. Thank you. Link to comment Share on other sites More sharing options...
rcracel Posted September 27, 2006 Share Posted September 27, 2006 if you actually explain what your problem is, then maybe you will get some answers. Most people don't have the time to go around trying to guess what kind of problems you may be running into.RC Link to comment Share on other sites More sharing options...
pajarokillo Posted September 27, 2006 Author Share Posted September 27, 2006 Ok, excuse me, i might have detailed more my problem. I execute my report from a servlet, and i set the content type to "application/pdf". Then, from my Jsp page i open a window that call to servlet and display the report in PDF format. I have installed Acrobat 7.0 and it works correctly, i can see my report, but when i try it in other machine that it has installed Acrobat 6.0 or less, it don't work, the report is blank, and it don't give me any exception. I don't know if i explain me better, my english isn't good. Thanks.Post edited by: pajarokillo, at: 2006/09/27 13:25 Link to comment Share on other sites More sharing options...
lucianc Posted September 27, 2006 Share Posted September 27, 2006 Try exporting the report to a in-memory buffer and setting the content length for the response before sending the response data and see whether it makes a difference. HTH,Lucian Link to comment Share on other sites More sharing options...
pajarokillo Posted September 28, 2006 Author Share Posted September 28, 2006 yes, i had already exported to a in-memory buffer and set the content length for the response, my portion of code when i do that is the following: byte[] bytes = null; bytes = report.getReport(); if(bytes != null && bytes.length > 0){ response.setContentType("application/pdf"); response.setContentLength(bytes.length); ServletOutputStream outputStream = response.getOutputStream();outputStream.write(bytes,0,bytes.length);outputStream.flush();outputStream.close(); Link to comment Share on other sites More sharing options...
lucianc Posted September 28, 2006 Share Posted September 28, 2006 You could also try to setting explicit values for the JRPdfExporterParameter.PDF_VERSION export parameter and see whether it has any effect. If you save a copy of the PDF using Acrobat 7.0 and open the file with Acrobat 6.0, does it work? 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