Post Reply 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Handle PDF output
12-14-2010, 08:44 AM
Post: #1
Handle PDF output
* 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");
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

Send your comments, Suggestions or Queries regarding this site at

Copyright © 2010 All Rights Reserved