且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用单个报告查看器创建多个PDF报告

更新时间:2023-02-12 23:08:50

假设您将PDF查看器留给客户端,则可以通过将mime类型更改为"application/pdf"将二进制pdf从虚拟页面转储到客户端. br/>
Assuming you leave PDF viewer to the client you can dump binary pdf from a dummy page to client by changing mime type to "application/pdf".
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "application/pdf";
// Fill data here with binay PDF supplied by reporter or create PDF here.
// You can check GET or POST parameters to decide what to report here.
Response.BinaryWrite( data );
}