PDF or portable document format is one of the most used formats when it comes to sharing something. While softwares such as Adobe Reader can be used to view the pdf files on your computer. But what if you want to embed the pdf onto your WordPress website instead of letting the users download and view it on their computers.
WordPress allows you to upload the pdf files on your website using the Add Media option but there is no option to embed it by default. This is where we can use plugins to add the functionality of embedding pdf in our WordPress website.
Embed PDF into WordPress using a plugin
The easiest way to start embedding PDFs in your website is by using a plugin. There are many plugins for the job. PDF Embedder is one of the most popular plugins for embedding pdf.
PDF Embedder –
- Install and Activate the PDF Embedder plugin on your website.
- Visit Settings -> PDF Embedder from your admin dashboard for making any changes to the Default Viewer Settings. You can change settings such as width and height of your embedded pdf file. It also allows you to change a few toolbar settings.
- Now create a new post or page or edit the existing one where you want to embed the pdf in.
- When using the Classic Editor, click on the Add Media button. Upload the pdf and insert it into the post. Your post should now have the pdf embedded through the shortcode.
When using the Gutenberg Editor, click on the Add Block icon. Select the PDF Embedder block and upload the pdf. The pdf should now be embedded in your post or page.
Settings for specific embeds can be changed using the shortcodes. A pdf embedder shortcode should look something like below based on your global settings.
[pdf-embedder url=”http://website.com/wp-content/uploads/2020/10/June.pdf” width=”400″ toolbar=”bottom” toolbarfixed=”on”]
You can change the settings in the shortcode to override the global settings.
Embed PDF without using a plugin
If in any case you want a solution that does not involve installing a plugin on your website. You can use Google Drive to embed a pdf.
Steps to use Google Drive to embed a pdf:
- Visit Google Drive and upload the pdf file.
- After uploading, make the pdf file shareable. You can also change the download, print and copy options according to your needs.
- Copy the embed code from the Embed Item menu option.
- Paste this embed code in your WordPress editor.
- Now save your post and you can see the embedded pdf in your post or page.
Bottom Line
It’s better to embed the pdf on your website instead of letting the visitors go off site for viewing it. Both the methods shared above are great for embedding pdf on your WordPress website. Select the method that you are comfortable with and follow the steps to embed the pdf on your website.