none
Response ContentType "application/PDF" not working in "IE 11"

    Question

  • Hi,

         I am trying to generate PDF file from HTTP Response Output stream in "Internet Explorer 11", but the PDF is not getting generated. it says, "File might have deleted or moved". kindly help me on this.

    here is my code:

    this.Response.AddHeader("Content-Type", "application/pdf");
    this.Response.AddHeader("Content-Disposition", "attachment; filename=SampleGuide.pdf");
    this.Response.Flush();
    this.Response.BinaryWrite(documentContent);
    //DocumentContent is a Byte[] of the data to be written in PDF
    this.Response.Flush();
    this.Response.End();

    Regards

    Karthik

    Monday, December 02, 2013 1:05 PM

Answers

  • Hi,

    Tools>Internet Options>Advanced tab, uncheck "Do not save encrypted files to disk"

    PDF is not natively supported in MSIE browsers... You need an installed and enabled PDF file reader ActiveX control to render the PDF file stream.

    When posting to this forum for questions about html, css and scripting for website development it is helpful if you include a link to your website for us to inspect and debug the markup and scripts....

    Questions about server side programming and configuration should be directed to the appropriate forum.

    regards.


    Rob^_^

    Tuesday, December 03, 2013 3:54 AM