Make PDF display inline instead of separate Acrobat Reader window

后端 未结 8 1924
别跟我提以往
别跟我提以往 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:15

    I think this header will do what you want

    Content-type: application/pdf
    

    Since you say that is not working, then I suspect it is a configuration setting on the client side.

    Check your installed version of Adobe Acrobat. There is a setting in preferences for "Internet" and a checkbox that says "Display PDF in Browser".

    --
    bmb

提交回复
热议问题