Jump to content
We've recently updated our Privacy Statement, available here ×

PDF stream works in IE5+ but not Firefox 1.01


2004 IR Help

Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...