locked
Response BinaryWrite not working on Android browser RRS feed

  • Question

  • User-1021264242 posted

    Hi,

     I have a byte array in the database and i need to show that in a pdf file format. Here is the way i did that. However, this doesn't work on Android tablets(checked 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.BinaryWrite(binaryData);
    Response.OutputStream.Write(binaryData, 0, binaryData.Length);
    Response.End();

    Can you guys think of any way i could make it work on all the browsers?

    Appreciate the help

    Thanks

    Tuesday, May 1, 2012 11:21 AM

All replies

  • User1943143334 posted

    Hi,

    Why don't you create a PDF file at server, and push that file to the device browser!

    Hope it helps u...

    Wednesday, May 2, 2012 5:33 AM