Updated on May 11, 2023
While displaying a PDF document on your website may be necessary, the user should not be directed away from the site. In this case, you must embed the document directly into a PDF viewer on your website. However, the built-in features of WordPress do not support embedded PDF files. To address this issue, we will show you how to use a free plugin to embed a PDF document on your WordPress site.
This post includes:
If you can't avoid embedding a PDF file into your website, you should think twice about it. PDF files embedded in websites should not be used for several reasons:
Consider reorganizing your content to fit as part of your website and inserting your website content directly into your website as text, images, and so on, rather than embedding a PDF file.
Despite the disadvantages, you will need a WordPress plugin if you want to embed a PDF file into your WordPress site. A good solution for this need is PDF Embedder, a free plugin on wordpress.org.
The steps that follow are dependent on which editor or page builder you use on your website. It may be required that you to work with some HTML code.
<div class="wp-block-cgb-block-pdf-embedder"> <iframe class="wp-block-cgb-block-pdf-embedder-iframe" src="https://example.com/wp-content/plugins/algori-pdf-viewer/dist/web/viewer.html?file=https://test.example.com/wp-content/uploads/demo-doc.pdf" style="width:600px;height:300px"></iframe></div>
Both methods mentioned in this article are viable options for embedding a PDF file in WordPress. Choose the method that best meets your needs and skill set. You can then quickly create, embed, and display a variety of PDFs on your website, engaging and serving your audience.
We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!