Embed a PDF into a post or page | realsmart

Embed a PDF into a post or page

A little code snippet for reliable embedding of PDFs with a fallback link for non-compatible browsers. It's essentially four steps:

  1. Upload your PDF to the WordPress media library
  2. Copy the URL to the uploaded PDF
  3. With the text editor in 'text' view you can now paste in the snippet below
  4. Replace "PDF_URL" with your PDF URL from the media library

Watch this video

Here's the snippet of code you will need.

<object data="PDF_URL" type="application/pdf" width="100%" height="1200px">
    <p><a href="PDF_URL">You can click here to download the PDF file.</a></p>
</object>