2006 IR Open Dicussion Posted August 27, 2006 Share Posted August 27, 2006 By: real_braindance - real_braindance Problem exporting to PDF - blank document 2006-04-21 05:01 Hi! I have very strange problem with exporting complex enough jasper report to PDF. Exporting to XLS and HTML works fine. Sometimes (not in every case) depends on how much data or elements placed on jasper report after exporting to PDF I get blank document. But interesting thing that it is big sized blank document (200 Kb) and with scrolling. Can someone advice something for me to try to do with this? P.S. I tryed lots of thnings, but couldn't find the logic and the reason why this happends. I used itext 1.3.1 and 1.4 and jasperreports 1.2.0 and 1.2.1 but it doesn't help. Thank you in advance Link to comment Share on other sites More sharing options...
Enkidu36 Posted May 7, 2007 Share Posted May 7, 2007 I am seeing a similar problem. The PDF export seems to work from my tomcat server on my local machine (windows box) but when I move the code up to a Linux test server the pdf page will display blank. I am using code similar to that of the Webapps sample. Thanks Link to comment Share on other sites More sharing options...
Enkidu36 Posted May 8, 2007 Share Posted May 8, 2007 I fixed my problem with this code found on another post: 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...
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