Display PDF Files from Amazon S3 using PDF Viewer for WordPress

by | Jun 23, 2015 | Blog, Solutions

Many users have been asking for an way to pull pdf files from Amazon S3, So, We did a workaround and identified an way to display PDF Files from Amazon S3 using PDF Viewerf for WordPress Plugin.

PDF Viewer for WordPress can’t pull pdf files from Third party domains due to cross domain policy. But you can pull pdf from third party sites as well, just need to have CORS enabled on the source server. Have a look at the following link for more information about CORS enable-cors.org

By the way, Amazon s3 provides an option to add/edit CORS configuration for each bucket. In this article I’ll show you the way how you can update CORS setting on Amazon s3 to make your pdf’s files accessible by PDF Viewer for WordPress.

1. Login to your s3 management console

2. Enter the bucket you want to change setting of

3. Click on Permission and scroll to Cross-origin resource sharing (CORS) section

4.  Click on Edit button in that section

5. Put the following codes in the popup editor that will appear after clicking on Edit CORS Configuration:

6. Click on Save

7. Upload a pdf file inside the bucket.

8. Make sure to change permission of the uploaded file to accessible by everyone


9. Now Copy the pdf file url and go back to your website’s post/page editor. Put the url in any of tnc-pdf-viewer shortcodes and the pdf should appear inside the viewer!

Please feel free to use our support portal if you have any question or need support for any issues.

Thank You


Related Posts

Popular Post