Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Getting attachments to open the way you want has everything to do with the headers you send. If you locate to an .aspx page that you want to act as a dynamic PDF resource these HTTP headers become increasingly important.</p> <p><a href="http://www.rgagnon.com/javadetails/java-0404.html" rel="nofollow noreferrer">This website</a> states a number of reasons why it might not work in IE.</p> <ol> <li>Set the content-type of the response to "application/pdf", ex. response.setContentType("application/pdf");</li> <li>Add a dummy parameter on the end of the url, like: <a href="http://x.y.z/DoGenCompStmt?filename=dummy.pdf" rel="nofollow noreferrer">http://x.y.z/DoGenCompStmt?filename=dummy.pdf</a> because IE ignores content-types, so you need to give it a hint, and the ".pdf" extension is an easy way.</li> <li>Set the "content-length" on the response, otherwise the Acrobat Reader plugin may not work properly, ex. response.setContentLength(bos.size());</li> <li>An additional thing that seems to help some IE browsers is to also have : response.setHeader("Content-Disposition", "inline;filename=somepdf.pdf"); </li> </ol> <p><strong>EDIT:</strong> since you already tried all of the above i can only point you to the <a href="http://www.ietf.org/rfc/rfc2183.txt" rel="nofollow noreferrer">rfc for content disposition</a> which to my knowledge is the only way to tell a browser how to deal with binary content.</p> <p><strong>EDIT</strong>: what would really help is to see the HTTP Headers it currently returns when you try to open the pdf in the browser. <a href="http://www.fiddlertool.com/Fiddler2/version.asp" rel="nofollow noreferrer">Fiddler does a great job at catching traffic</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload