How to embed a PDF?

How do I embed a PDF that has been uploaded to the Wordpress media area? There seems to be no element to display a PDF (or other document file for that matter) in Bricks yet we can display a video, map, image and audio file.

It looks like the only way to do this is to use an iframe or embed in the shortcode element, is this correct?

What if I am loading PDFs into a CPT and want to dynamically display a PDF on a page based upon a term ID/name in the CPT record?

Any help greatly appreciated.

A quick google search led me to PDF Embedder – WordPress plugin |

You may want to give it a try.

thanks for the reply.

Yep, checked all the possible plugins but surely I shouldn’t need a plugin to do this. Being able to display a PDF file should already exist in Bricks and it is a glaring hole in the Media elements section. For PDFs, Bricks could simply reply upon the in-built browser support, no need for any other 3rd party viewer. It is also possible to control the tools available to the reader, for example not being able to download the file, copy it etc. The vast majority of these plugins also use iframe which I’m not keen to use. A plugin also can’t be dynamically passed the pdf file to display from a CPT.

The plugin you suggest is OK but provides no control over the tools available to the reader, you have to pay for the secure version which is $30/yr. For now I’ve gone with Wonder PDF Embed as it doesn’t use an iframe and provides the secure options for free.

Hello Simon, I also faced this problem and helped me solve it. They also provide PDF to Word and image (PNG/JPEG) to Word conversion services. With their help, I not only solved a similar problem, but also delivered my necessary work faster. So feel free to recommend their services to you.

Did you find a way to do it?

This is how I did it: add a Shortcode to your template and type your embed html in the Shortcode box under Content, like this:

<embed src="/wp-content/uploads/(..your file path..).pdf" type="application/pdf" width="100%" height="500px"></embed>

1 Like

I did it using a shortcode and the following code:

So I’m dynamically pulling the PDF from a custom post type.

1 Like

thank you so much that is really helpfull

btw in case if you need convert pdf to other formats, use this tool PDF Converter for converting PDF files - OneConvert , you will find many tools thers