1 2 3 4 5 6 7 8 9 10 11 12
|
byte[] contenu = lr.Render("PDF", deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
context.Response.Clear();
context.Response.ClearContent();
context.Response.ClearHeaders();
context.Response.ContentType = mimeType; //"Application/pdf";
context.Response.Charset = System.Text.UTF8Encoding.UTF8.WebName;
context.Response.AppendHeader("Content-Disposition", "inline; filename=\"" + CodeModel + "." + extension + "\"");
context.Response.BinaryWrite(System.Text.Encoding.UTF8.GetPreamble());
context.Response.BinaryWrite(contenu);
context.Response.End(); |
Partager