Response BinaryWrite not working on Android browser RRS feed

  • Question

  • User-1021264242 posted


     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.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);

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

    Appreciate the help


    Tuesday, May 1, 2012 11:21 AM

All replies

  • User1943143334 posted


    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