PDF Viewer is a Wordpress plugin to embed PDF files in your Wordpress website. Based on Mozilla's PDF.JS library, it requires just Javascript to work.
This JS files of this plugin are coded in pure Javascript, with no dependency on jQuery. It is also possible to embed multiple PDFs in a single Wordpress page or post using this plugin.
Screenshots
Support
I'll be providing support through the comments at the bottom.
Installing the Plugin
Installing this plugin is like installing any other Wordpress plugin.
- Go to your Wordpress admin, and click on the menu Plugins. Click on the button Add New.
- Click on the button Upload Plugin
- Upload the plugin zip file pdf-viewer-pro.zip located in the files that you have downloaded
- Activate the plugin in the next screen
- Upon successful installation and activation, you should see a message like this :
Uploading PDF files to Wordpress Media
For PDF files to be embedded in your Wordpress website, you will need to save those PDFs in the Wordpress Media.
Go to your Wordpress admin, and click on Media menu. Click on Add New, and upload the PDF files that you plan to embed.
When the PDF files are uploaded, you will get a URL for each uploaded PDF. These are the URLs that you need while using the plugin in the next step.
After successful installation and activation of the plugin, you can use the plugin through a shortcode. The format of the shortcode is :
[UA_PDF_VIEWER_LITE width="600" pdf="http://url-of-the-pdf"][/UA_PDF_VIEWER_LITE]
There are basically 2 parameters that you need to pass with the shortcode UA_PDF_VIEWER_LITE
A cross domain PDF link is also allowed if the server supports CORS (For example Dropbox / AWS S3).
Few examples of using the shortcode are :
[UA_PDF_VIEWER_LITE width="600" pdf="http://wordpress.usefulangle.com/wp-content/uploads/2017/09/sample2.pdf"][/UA_PDF_VIEWER_LITE]
[UA_PDF_VIEWER_LITE width="300" pdf="http://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf"][/UA_PDF_VIEWER_LITE]
You can add this shortcode to the post or page where you need the PDF to be embedded.
There is also a Pro version of this plugin with advanced features.
Frankly speaking, I would have given the pro version for free (like all other codes on usefulangle.com). But being an adult has some silly responsibilities to take care of. You have to earn money, whether you like it or not.
Lite Version vs Pro Version
Lite Version | Pro Version | |
---|---|---|
Set width for PDF embed | Yes | Yes |
Prev Page / Next Pae | Yes | Yes |
Full-Screen Mode PDF can be viewed in full-screen mode | — | Yes |
Modal Mode PDF can be viewed in a modal window | — | Yes |
Theme Color for Viewer Theme color can be set for PDF Viewer | — | Yes |
Image Mode Image of first page of PDF is automatically extracted. Clicking on this image, PDF is seen in a modal window | — | Yes |
Link Mode On click of a link, PDF can be viewed in a modal window | — | Yes |
Update Frequency | Low | High |