C# - Binary PDF File on Web Broswer via Binary Stream

Your binary PDF File was saved in MSSQL2008 in image data type.

Byte[] _binary_document;// you get your binary data from database and assign to this parameter.

//Result of binary stream
Response.ContentType = "Application/pdf";
Response.AppendHeader("Content-Length", _binary_document.Length.ToString());
Response.BinaryWrite(_binary_document);

Popular posts from this blog

SAP CPI - Loop Process Call with SuccessFactor (oData V2)

Setting IntelliJ IDEA to run Groovy Script

C# - BASE64 to Image