Op 3/03/2011 16:33, Pulapaka, Vijaya schreef:
Hi team, My requirement is to take the BytearrayOutputstream and open to a browser.
How would that work? Somebody who want to use your web app should already have an open browser. Otherwise they can't use your web app, can they?There's no way I can write an app on my server that opens a browser on your computer.
(That would be considered a security hazard.)
I have written the code like below : response.setHeader("Expires", "0");response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");response.setHeader("Pragma", "public"); response.setContentType("application/pdf"); response.setHeader("Content-disposition", "inline; filename=foobar.pdf"); response.setContentLength(byteArrayOutputStream.size());ServletOutputStream outputStream = response.getOutputStream();byteArrayOutputStream.writeTo(outputStream); outputStream.flush(); outputStream.close(); byteArrayOutputStream.close(); But the browser is not opened.
Are you saying you want to open a PDF in a standalone viewer, rather than in the viewer plug-in? In that case, you need to replace "inline" with "attachment" in your code.
------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText® is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
