Blog Categories:Web Development 1, <embed width= "height=" src= "test_pdf.pdf" > </embed>
Browsers passed: 360, Firefox, IE, Chrome
2, <object classid= "clsid:ca8a9780-280d-11cf-a24d-444553540000" width= "" height= "" "Border=" "0" >
<param name= "SRC" value= "Test_pdf.pdf" >
</object>
Here's the complete point:
<object classid= "clsid:ca8a9780-280d-11cf-a24d-444553540000" width= "100%" height= "100%" border= "0" ><!-- Ie-->
<param name= "_version" value= "65539" >
<param name= "_extentx" value= "20108" >
<param name= "_extenty" value= "10866" >
<param name= "_stockprops" value= "0" >
<param name= "SRC" value= "Testing_pdf.pdf" >
<embed src= "testing_pdf.pdf" width= "100%" height= "href=" ></embed><!--testing_pdf.pdf
</object>
Browsers passed: 360, IE
Failed browsers: Firefox, Chrome
3, <iframe src= "test_pdf.pdf" width= "height=" ></iframe>
Browsers passed: 360, Firefox, IE, Chrome
4, with the browser directly to access http://127.0.0.1/test_pdf.pdf (in fact, this is not in the Web)
Browsers passed: 360, Firefox, IE, Chrome
All of the above four methods are under WinXP. (before have encountered the function of upload in Win7 under the condition of failure, so here explain the OS)
--------------------------------------------------------
Today there is a need to display the PDF in the Web page, so immediately began to search the solution, inadvertently found a very good solution, see http://blogs.adobe.com/pdfdevjunkie/web_designers_guide.
In fact, just look at this site is enough, http://www.pdfobject.com/.
Record the main code:
Pdfobject.js Download: Http://pan.baidu.com/s/1kTJTiqr HTTP://PAN.BAIDU.COM/S/1KTJTIQR
<script type= "Text/javascript" src= "Scripts/pdfobject/pdfobject.js" ></SCRIPT>
<script type= " Text/javascript ">
Window.onload = function () {
var success = new Pdfobject ({URL:" pdf /cgvet22-08-2011v2p.pdf ", Pdfopenparams: {scrollbars: ' 0 ', toolbar: ' 0 ', StatusBar: ' 0 '}}). Embed (" pdf1 ");
};
</script>
<div id= "pdf1" style= "width:700px; height:600px;" >it appears you don ' t have Adobe Reader or PDF support in this web browser. <a href= "~/pdf/cgvet22-08-2011v2p.pdf" >click here to download the Pdf</a></div>