PDF generated from Aspose does not opening Chrome browser

We are using Aspose.PDF version 9.8.0 to create the PDF files programmatically in C#. The PDF file is generated successfully and managed to download through client browsers. When the document is accessed from server via client browser, the PDF document is rendering in browsers IE9, IE11 without any issues. But when accessing through Chrome browser, the document is not rendering and it keeps showing “Loading” message. Below is the code we use to send response to client browser,


MemoryStream stream = new MemoryStream(btImage);
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.Buffer = true;
Response.Charset = “UTF-8”;
Response.AddHeader(“Accept-Header”, stream.Length.ToString());
Response.AddHeader(“Content-Length”, stream.Length.ToString());
Response.AddHeader(“Expires”, “0″”);
Response.AddHeader(“Pragma”, “cache”);
Response.AddHeader(“Cache-Control”, “private”);
Response.AddHeader(“content-disposition”, String.Format(“inline;filename={0}”, “article” + docId + “.pdf”));
Response.ContentType = “application/pdf”;
Response.AddHeader(“Accept-Ranges”, “bytes”);
Response.BinaryWrite(stream.ToArray());
Response.Flush();
Response.End();


Hi Siluvai,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 10.9.0 in VisualStudio 2010 application running over Windows 7 (x64) where I have used Chrome 46.0.2490 and as per my observations, the PDF file download box is properly being displayed and I am able to download the resultant file. Can you please try using latest release version and share your findings.

We are sorry for your inconvenience.