title: IE8 Issue: PDF file is displayed as inline
body: <p>I am downloading a PDF from my server. I set the "Content-Disposition" as "attachment". Its working very fine is Firefox. But in IE8 its displayed as inline. Any quick pointers to resolve this issue ?</p>
  
  <p>Edit:</p>
  
  <p>I am using Springs to write the PDF byte array stream. And using JSP in the client side to display.</p>
  
  <p>Client side:</p>
  
  <p>I am using a dhtml grid and keeping an  tag. The code in the grid looks like:</p>
  
  <pre><code>&lt;a href='javascript:viewPDF(14)' target="_self" &gt;View&lt;/a&gt;
  </code></pre>
  
  <p>On click of this the method viewPDF gets invoked. I kept this code in my javascript file.</p>
  
  <pre><code>function viewPDF(id) {
      $("#pdfID").val(id);
      $("#myform").attr('action',url);
      $("#myform").submit();
  }
  </code></pre>
  
  <p>Server side code base:</p>
  
  <pre><code>ByteArrayOutputStream reportBAOS = getPDFByteArrayStream();/*This is my method which returns the byte array stream.*/
  response.setContentType("application/pdf");
  response.setHeader("Content-Disposition","attachment; filename=testfile");
  response.setHeader("Pragma","Public");
  response.setHeader("Cache-Control","must-revalidate,post-check=0,pre-check=0");
  response.setHeader("Expires","0");
  ServletOutputStream os = response.getOutputStream();
  os.write(reportBAOS.toByteArray());
  os.flush();
  os.close();
  </code></pre>