I tried this in jsFiddle and it works well in Chrome and FF, you need to check other browsers as well.
Convert byte[] to Base64 using
string base64PDF = System.Convert.ToBase64String(outputPDF, 0, outputPDF.Length);
All I had to do was to specify the MIME type as data:application/pdf;base64, in the source and provide Base64 a PDF version.
<object data="data:application/pdf;base64, JVBERi0xLjQKJeLjz9MKMyA..." type="application/pdf" width="160px"> <embed src="data:application/pdf;base64, JVBERi0xLjQKJeLjz9MKMyA..." type="application/pdf" /> </object>
I could not hide the top toolbar that appears in FF by adding #toolbar=0&navpanes=0&statusbar=0 .
IE8 needs a saved pdf file to be displayed.
source share