Hi @brustar,
Thanks for getting back to us with the error message.
The Failed to Fetch error usually happens when the PDF you are trying to embed is being served from a different domain or sub-domain from where it is being displayed. For example, if you embed the PDF on the domain https://domain.com, an error will result if the PDF is served from:
- a different domain: https://site.com,
- a different domain:?https://s3.amazonaws.com/domain.com/
- a different sub-domain:?https://domain.com,
- a different sub-domain:?https://www.domain.com,
- a different sub-domain:?https://domain.com/en/
If you are using an SSL certificate, you may have an issue where the front end and back end of your site are not under the same protocol (i.e. http vs. https). If you are using redirects, you may have a situation where the backend is under the “www.domain.com” sub-domain, but the front end is just “domain.com”. This will trigger the Failed to Fetch error.
These are all fixes you need to do at the server / WP installation level. For more information on this error, please see:
https://wp-pdf.com/kb/failed-to-fetch/.
If you are serving the PDFs from a CDN such as Amazon S3 or perhaps even your webhost (i.e. WPEngine uses a CDN), you will need to set up a CORS
(cross-origin resource sharing) configuration to meet the browsers security requirements to eliminate this error. We have instructions on how to set up a typical CORS
config here:
https://wp-pdf.com/kb/hosting-pdfs-on-other-services-such-as-amazon-s3/.
If you see an error in the browser’s Developer Tools > Console tab regarding Access-Control-Allow-Origin header, there is a fix for that in the same documentation.
I hope this is helpful. Thanks ??