2004 IR Help Posted August 20, 2006 Share Posted August 20, 2006 By: DB - db17 PDF stream works in IE5+ but not Firefox 1.01 2005-03-06 15:42 I've been reading through threads in here regarding PDF exports not working in IE but they are working in Mozilla. I'm having the exact opposite problem. My PDF streams fine to the browser and opens in a new window, which is exactly what I want. But when I execute the same code from Firefox, the window pops up, I can see that it streamed from the console, but the new windows hangs and the PDF never displays. Here's my code: ServletOutputStream outStream = res.getOutputStream(); res.setContentType("application/pdf"); JRPdfExporter pdfExporter = new JRPdfExporter(); pdfExporter.setParameter(JRPdfExporterParameter.JASPER_PRINT, jasperPrint); pdfExporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM, outStream); pdfExporter.setParameter( JRPdfExporterParameter.PERMISSIONS, new Integer(PdfWriter.AllowPrinting | PdfWriter.CenterWindow) ); pdfExporter.exportReport(); On a side note, does anybody know how to make the streamed PDF printable, but not savable? On the permissions, I omitted PdfWriter.AllowCopy, but it still allows it to copy, even when I set encryption. Thanks! 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