chiphi13 Posted October 19, 2006 Share Posted October 19, 2006 Has anyone else encountered this error and has a fix for it? I am using jasperreports 1.2.6 to produce pdfs online. "The Adobe Reader couldn't open 'pa020081.fdf' because this type of file is not supported or because it's corrupted." I haven't been able to reproduce this error, but users are experiencing it online.:whistle: size=230]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/fdferror4.pngPost edited by: chiphi13, at: 2006/10/19 15:46 Link to comment Share on other sites More sharing options...
lucianc Posted October 24, 2006 Share Posted October 24, 2006 What headers do you set for the response? If you don't set Content-Length, you should try exporting the report to a temp file (or memory), set the response content length and write the PDF data from the temp file or memory to the response.. HTH,Lucian Link to comment Share on other sites More sharing options...
chiphi13 Posted November 3, 2006 Author Share Posted November 3, 2006 I am setting the following for the response: response.setContentType("application/pdf");response.setHeader("Content-Disposition", "inline,fileName=JasperReport.pdf");response.setContentLength(reportContents.size()); Link to comment Share on other sites More sharing options...
lucianc Posted November 6, 2006 Share Posted November 6, 2006 No other clues then.. Maybe others have stumbled upon this behaviour and managed to identify the cause. Regards,Lucian 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