Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Streaming PDF to browser...
DButtery
Hi all,
I am using the ReportEngine to generate a PDF report. In some cases I want the file landed as a flat file. This works and all is well.
In other cases, I am streaming the file back to a browser application. This part is not working so well...
My question is this: Is there any difference in the content of what is landed using setOutputFileName() vs. what is streamed via setOutputStream() ???
Thanks.
Find more posts tagged with
Comments
JasonW
If you want to stream back PDF use
the following:
PDFRenderOption options = new PDFRenderOption();
options.setOutputFormat("pdf");
response.setHeader("Content-Disposition", "inline; filename="test.pdf"" );
response.setContentType( "application/pdf" );
options.setOutputStream(response.getOutputStream());
Jason