1

I have one requirement: when we save any generated PDF it's taking the name of page, but I want to give the specific name.

I have tried it with code change but this was no help.

In Mozilla it's working fine but in I.E. it's not working.

Anyone who has faced the issue before, please help me.

Code:

Dim report As Byte() = ReportSrv.Document_Get(version, reportTemplateID, caseno, User.Identity.Name, UseThisRequestForRest)

Response.ContentType = "application/PDF"
Response.Filter = New System.IO.Compression.DeflateStream(Response.Filter,CompressionMode.Compress)

Response.AppendHeader("Content-Encoding", "deflate")

Response.AppendHeader("Content-Disposition", "inline; filename='" + caseno + "'.pdf")

Response.OutputStream.Write(report, 0, report.Length)

Response.End()
4

1 回答 1

0

试试下面

Response.AppendHeader("content-disposition", "filename=" + caseno + ".pdf");

或者

string str = new ContentDisposition { FileName = this.FileName, Inline = Inline }.ToString();
Response.AppendHeader( "Content-Disposition", str );
于 2013-09-16T10:54:59.833 回答