Make PDF display inline instead of separate Acrobat Reader window

后端 未结 8 1878
别跟我提以往
别跟我提以往 2020-12-16 21:48

I\'ve got an ASP.NET ashx class that retrieves data from a database, creates a PDF file using iTextSharp, and streams the PDF to the browser. The browser (IE and Firefox at

8条回答
  •  粉色の甜心
    2020-12-16 22:11

    If you are using an ashx (web handler) try this:-

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

提交回复
热议问题