I have an array of bytes in the database, and I need to show this as a PDF file. Here is how I did it. However, this does not work on Android tablets (verified in 2.3.5 and 3.2).
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.BufferOutput = true;
Response.Buffer = false;
Response.AddHeader("Content-Length", binaryData.Length.ToString());
Response.AppendHeader("Content-Disposition", "inline;filename=ClientDocument.PDF");
Response.OutputStream.Write(binaryData, 0, binaryData.Length);
Response.End();
Can you guys think about how I can make it work on all browsers?
Rate help
thank
source
share