Sign In  Sign Up Live-Chat

Another question about DataUtil.ForceDownload

Last post 03-25-2008, 4:25 AM by saqib.razzaq. 1 replies.
Sort Posts: Previous Next
  •  03-24-2008, 4:58 PM 118942

    Another question about DataUtil.ForceDownload

    I'm also trying to use DataUtil.ForceDownload to download a PDF contained in a MemoryStream:

                   MemoryStream ms = new MemoryStream(pdf);
                    DataUtil.ForceDownload(Page, ms, "Letters.pdf", "application/pdf");

    The problem is that the file opens directly in the browser and I'd like the user to be prompted with an Open/Save dialog box.

    There doesn't seem to be a way to set the Content-Disposition to "attachment" with ForceDownload, is there?

    Thanks for your advice.
    Mike
     
  •  03-25-2008, 4:25 AM 119019 in reply to 118942

    Re: Another question about DataUtil.ForceDownload

    Hi Mike,

    This behaviour is due to the Adobe Reader settings. Please change the settings in Adobe Reader for enabling Open/Save dialog box.

    To change the settings, open Adobe Reader, goto Edit --> Preferences --> Internet. Uncheck "Display pdf in browser".

    After changing the settings, the pdf doc will open in a new window in Adobe Reader software.


    Best Regards,

    Saqib Razzaq
    Support Developer
    Aspose Guangzhou Team

     
View as RSS news feed in XML