Embedding a PDF using HTML markup
Click here to learn about embedding a PDF using JavaScriptEmbedding a PDF using the standards-compliant <object> element is actually rather simple, and looks like this:
<object data="myfile.pdf" type="application/pdf" width="100%"
height="100%">
<p>It appears you don't have a PDF plugin for this browser.
No biggie... you can <a href="myfile.pdf">click here to
download the PDF file.</a></p>
</object>
Note the <p> nested inside the <object>; this content will be displayed if the browser isn't capable of displaying the <object>.
In this example, the 'fallback' content contains a link to the PDF,
which allows visitors who don't have the Adobe Reader plugin to download
the PDF and view it offline.
No comments:
Post a Comment