Does Adobe PDF Reader has support for streaming while rendering document content in a browser? I have to render PDF document in browsers using streaming so that the user can view the first few pages while remaining pages of the document is loading at the background. Could anyone please confirm if this streaming capability is supported by Adbobe Reader?
I tried below approach and noticed the document is not rendering in IE at all (I see white page). However, in Chrome, I see the document rendering but the content is not rendered properly (I mean only part of the content is rendered. Also, images and tables are not rendered properly).
Code snippet:
=========
Response.ClearHeaders();
Response.ClearContent();
Response.ContentType = "application/pdf";
Response.AddHeader("content-Transfer-Encoding", "binary");
Response.AddHeader("Content-Disposition", "inline; filename=output" + ".pdf");
Response.AddHeader("Pragma", "no-cache, no-store");
Response.AddHeader("Content-Length", stream.Length.ToString());
Response.BufferOutput = false;
const int bufferLen = 2048;
byte[] buffer = new byte[bufferLen];
int count = 0;
while ((count = stream.Read(buffer, 0, bufferLen)) > 0)
{
Response.BinaryWrite(buffer);
}
Response.End()