displaying PDFs in Web pages

Source: Internet
Author: User
Tags pdfobject

1. <embed width= "height=" src= "test_pdf.pdf" > </embed>

Browsers through: 360, Firefox, IE, Chrome

2.
<object classid= "clsid:ca8a9780-280d-11cf-a24d-444553540000" width= "0" height= "border=" >
<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= "testing_pdf.pdf" ></embed><!--ff-->
</object>

Browsers through: 360, IE

Browsers not approved: Firefox, Chrome

3. <iframe src= "test_pdf.pdf" width= "height=" ></iframe>

Browsers through: 360, Firefox, IE, Chrome

4, direct access to http://127.0.0.1/test_pdf.pdf with the browser (in fact this is not in the Web bar)

Browsers through: 360, Firefox, IE, Chrome
1. <embed width= "height=" src= "test_pdf.pdf" > </embed>

Browsers through: 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= "testing_pdf.pdf" ></embed><!--ff-->
</object>

Browsers through: 360, IE

Browsers not approved: Firefox, Chrome

3. <iframe src= "test_pdf.pdf" width= "height=" ></iframe>

Browsers through: 360, Firefox, IE, Chrome

4, direct access to http://127.0.0.1/test_pdf.pdf with the browser (in fact this is not in the Web bar)

Browsers through: 360, Firefox, IE, Chrome

Today there is a need to display the PDF in the Web page, and then immediately began to search solutions, 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:


<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 an Adobe Reader or PDF in the this web browser. <a href= "~/pdf/cgvet22-08-2011v2p.pdf" >click here to download the pdf</a></div>

displaying PDFs in Web pages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.