Knowledge Base/Advanced Tips/Advanced Tips

[Advanced Tips] How do I embed a PDF?

Omar
posted this on Feb 22 14:08

Embedding 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="1000px">
<p>It appears you don't have a PDF plugin for this browser. No biggie... You can download the latest version of the Adobe Reader <a href="http://get.adobe.com/reader/" target="_blank">here</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 where they can get the Adobe Reader browser plug-in.

 

You can also use the HTML5 embed tag:

 

<embed src="myfile.pdf" type="application/pdf" width="100%" height="300px" />

 

To embed a PDF file in a content post or funnel page:

  • Copy the code above
  • Paste it in the Content Body/HTML Editor
  • Replace 'myfile.pdf' with the URL where your PDF file is located

 

 

pdfembed.jpg
 
Topic is closed for comments