How can I open a pdf file directly in my browser?

后端 未结 7 550
陌清茗
陌清茗 2020-12-25 15:14

I would like to view a PDF file directly in my browser. I know this question is already asked but I haven\'t found a solution that works for me.

Here is

7条回答
  •  悲&欢浪女
    2020-12-25 15:31

    Change your code to this :

           Response.AppendHeader("Content-Disposition","inline;filename=xxxx.pdf");
           return File(filePath, "application/pdf");
    

提交回复
热议问题