Tutorials4u.net Forum

Full Version: Handle PDF output
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
* Set the content-type of the response to "application/pdf", ex. response.setContentType("application/pdf");
* Add a dummy parameter on the end of the url, like:
because IE ignores content-types, so you need to give it a hint, and the ".pdf" extension is an easy way.
* Set the "content-length" on the response, otherwise the Acrobat Reader plugin may not work properly, ex. response.setContentLength(bos.size());
* An additional thing that seems to help some IE browsers is to also have : response.setHeader("Content-Disposition", "inline;filename=somepdf.pdf");
Reference URL's