ThemeNcode Docs


Estimated reading: 3 minutes

Failed to Fetch Error Message – An error occurred while loading the PDF

We’ve received many support requests with this error message and that’s why this article is here. It includes a video as well, so you can understand it easily.

This error comes up when you have a mismatch in your file URL & website URL structure.

For example, your site may use URLs like: or or or

There’s no issue with any format, you can use any structure of URL but what you need to make sure of is the file URL you provide while creating the shortcode must have the same URL structure. Don’t use a different URL structure. Here is a video tutorial for you.

404 error on viewer pages

PDF viewer for WordPress creates 2 pages called ThemeNcode PDF viewer and ThemeNcode PDF viewer SC when you install the plugin. You may get a 404 error if these pages are deleted somehow.

To solve this: Please go to your plugins page, Deactivate PDF viewer for the WordPress plugin and activate it again. That should solve the issue.

How Can I use pdf files from external websites/URLs?

Using files from external sources requires CORS config. Please have a look at the following article that explains how to set up CORS config on amazon s3 bucket:

You can take some ideas from the article above and implement CORS on the website where you’re trying to use the PDFs From.

Can I use PDFs hosted on amazon s3 bucket?

Yes, you can display PDF files hosted on your amazon s3 bucket, Please follow the following article for more details on how you can set it up:

How can I change/customize WP File Access Manager Error Message on PDF viewer?

This question comes a lot about changing or customizing the error message when a user doesn’t have access to a specific PDF file. The default message Appears as:

You do not have permission to view this file, please contact us if you think this was by a mistake.
Go To Homepage

I am going to show you a quick workaround for changing this text. You’ll need to install a free plugin for this. So, Here are the steps:

  1. Search and install a plugin called Gettext to override translations & activate the plugin. Direct link here.
  2. Go to Plugins > Gettext override translations
  3. Add the text overrides on this page and save settings.
  4. The image below provides more specific details on exactly which string you should use to replace.
  5. This should change the text for you.

Here’s an example:


I hope it helps.

Previews/Next Navigation arrows are not showing on the left/right side of the PDF viewer

If you see the Previous & next icons on the left and right side of PDF viewer, it’s mostly caused by lazyload functionality. What you need to do is Disable Lazyload for viewer pages to get it displaying properly.

Leave a Comment