1. Download the Pdfobject.js file
2.
1<script type="Text/javascript"Src="<%= application["Rooturl"]%>js/pdfobject.js"></script>2 3<div id="divpdfcontent"style="height:860px; margin-top:5px; z-index:-9999 ;">4<embedclass="Pdfobject"Src='<%=getimagesrc ()%>'Type="application/pdf"style="Overflow:auto; width:100%; height:100% ;">5</div>
3.
1 protected string getimagesrc () 2 {3 string"showimage.aspx?id=" + Imageid.tostring (); 4 return SSRC; 5 }
4.
1 //Read the file2byte[] content = File.readallbytes (Server.MapPath (sql.tostring (rdr["ImagePath"])));3Response.ContentType =Sfiletype;4Response.OutputStream.Write (Content,0, content. Length);5 Response.OutputStream.Close ();6 //Read binary7Response.ContentType = sql.tostring (rdr["File_mime_type"]);8Response.OutputStream.Write (Sql.tobytearray (rdr["CONTENT"]),0, Sql.tointeger (rdr["file_size"]));9Response.OutputStream.Close ();
. NET loading PDF files with Pdfobject.js