“name” web pdf for better default save filename in Acrobat?

后端 未结 16 1758
难免孤独
难免孤独 2020-12-14 00:09

My app generates PDFs for user consumption. The \"Content-Disposition\" http header is set as mentioned here. This is set to \"inline; filename=foo.pdf\", which should be

16条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 01:02

    Instead of attachment you can try inline:

    Response.AddHeader("content-disposition", "inline;filename=MyFile.pdf");
    

    I used inline in a previous web application that generated Crystal Reports output into PDF and sent that in browser to the user.

提交回复
热议问题