Title: Error on PDF
Last modified: July 27, 2022

---

# Error on PDF

 *  Resolved [rwalsh456](https://wordpress.org/support/users/rwalsh456/)
 * (@rwalsh456)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-on-pdf/)
 * Hi There,
    I am trying to display PDF’s to my website and it is giving me the
   following error:
 * Setting up fake worker failed: “Cannot read properties of undefined (reading ‘
   WorkerMessageHandler’)”.
 * Any assistance would be greatly appreciated.
    Many Thanks, Ryan.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-on-pdf%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 14 replies - 1 through 14 (of 14 total)

 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15867555)
 * Hi Ryan,
 * The Fake Worker error is due to a conflict with caching tools and the PDF Embedder
   scripts. Please check the following on your site:
    1. Make sure that you are using the most up to date version of the plugin (Free
       v. 4.6.4, Premium v. 5.0.2, and Secure v. 4.4.5).
    2. While you do not need to exclude the PDF Embedder scripts with the majority 
       of caching tools, you do still need to make one settings adjustment in the caching
       plugin to disable inline or aggregation of JS files. Please see: [https://wp-pdf.com/kb/setting-up-fake-worker-failed-error-message/](https://wp-pdf.com/kb/setting-up-fake-worker-failed-error-message/).
       Your plugin settings may differ and it may be necessary to reach out to the 
       caching plugin support if you can not find this setting.
    3. Once the plugin has been updated, flush the cache to remove the old cached scripts.
       It may also be necessary to manually delete the minified script (/wp-content/
       cache/min/4d856323b4cef963c578dd7bd482e037.js):
    4. Finally, clear your browser cache and reload the page.
 *  Thread Starter [rwalsh456](https://wordpress.org/support/users/rwalsh456/)
 * (@rwalsh456)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15870543)
 * Hi There,
    im not sure if it is important or not but it works on the Preview 
   screen but when i open it up on an incognito window it is giving the error.
 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15884842)
 * Hi [@rwalsh456](https://wordpress.org/support/users/rwalsh456/),
 * The scripts are still being cached and are not loading on the page. I noticed
   that you are using WP Rocket. There is a specific setting for that caching plugin
   provided in our FAQ: [https://wp-pdf.com/kb/setting-up-fake-worker-failed-error-message/](https://wp-pdf.com/kb/setting-up-fake-worker-failed-error-message/)
 *  Thread Starter [rwalsh456](https://wordpress.org/support/users/rwalsh456/)
 * (@rwalsh456)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15901438)
 * Hi There,
    I don’t seem to have the “Remove Query Strings from static resources”
   option on my WP Rocket. When I disable the “Combine JavaScript files (Enable 
   Minify JavaScript files to select) and clear the cache it works correctly and
   shows the correct PDF but it then breaks other elements of the website including
   the images on the homepage.
 * Thanks,
    Ryan.
 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15908407)
 * Hi Ryan,
 * You may not have the query strings settings, but your test to disable the combine
   JS files confirms that the scripts are being cached.
 * While it is not normally needed to exclude the scripts, I would recommend that
   you exclude those. Once you click the Minify box and see the Combine checkbox,
   below that is a field to Exclude JS files from the minification/concatenation
   processes. Depending on which version of the PDF Embedder plugin you are using(
   free vs. Premium vs. Secure), the file path will differ for what you enter here.
   Please see:
    - [File paths for versions of PDF Embedder](https://wp-pdf.com/kb/using-caching-or-minifying-plugins/)
    - [Excluding external javscripts from WP Rocket](https://docs.wp-rocket.me/article/39-excluding-external-js-from-concatenation?utm_source=wp_plugin&utm_medium=wp_rocket)
 *  Thread Starter [rwalsh456](https://wordpress.org/support/users/rwalsh456/)
 * (@rwalsh456)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15920461)
 * Hi There,
    I have copied the following text and pasted it into the ‘Excluded 
   JavaScript Files’ section of WP Rocket. /wp-content/plugins/pdf-embedder/js/all-
   pdfemb-basic-4.6.4.min.js, /wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.
   min.js,and /wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.worker.min.js
 * When i then clear the cache, nothing has changed. I have Minify JavScript Files
   and Combine JavaScript files selected.
 * Perhaps i am going wrong somewhere,
 * Any help would be appreciated.
    Thanks, Ryan.
 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15924511)
 * Hi Ryan,
 * There is another error showing up in the console related to a “player” (Vimeo
   player API?). I would recommend resolving that error as well as errors in one
   JS-dependent element can cause cascading errors to other JS-dependent elements.
 *  [doughall222](https://wordpress.org/support/users/doughall222/)
 * (@doughall222)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15940478)
 * Hello,
 * Hello, thanks for posting information on how to upload a pdf and have it seen
   in other browsers other than Chrome and mobile too. After working on this for
   hours and using plugins like pdf embedder, it turns out that I looked on another
   site I was using which had Astra as the Theme. It worked fine. It is the 2022
   Theme that isn’t working.
 * When I switched from 2022 to Astra, it worked fine. Maybe this will help somebody.
 * Thanks again.`
 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15942339)
 * Thanks for sharing your findings [@doughall222](https://wordpress.org/support/users/doughall222/).
   I will get this passed on to the developers for further investigation.
 *  Thread Starter [rwalsh456](https://wordpress.org/support/users/rwalsh456/)
 * (@rwalsh456)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15944973)
 * Hi [@wppdfsupport](https://wordpress.org/support/users/wppdfsupport/), Im not
   sure what the Vimeo player API is and moreover what the issue is. Is there any
   guidance you could give on this?
    Thanks, Ryan.
 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15945787)
 * Hi [@rwalsh456](https://wordpress.org/support/users/rwalsh456/),
 * The “player” error is what showed up in the console tab when viewing the page.
 * Have you reached out to WP Rocket support since the issue has to do with caching.
   They may have some additioanl suggestions for their plugin settings that we are
   not aware of which could be helpful in your case.
 *  Thread Starter [rwalsh456](https://wordpress.org/support/users/rwalsh456/)
 * (@rwalsh456)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15958944)
 * Hi,
    Where can i contact WP rocket support? Thanks, Ryan.
 *  [PDFG Support](https://wordpress.org/support/users/wppdfsupport/)
 * (@wppdfsupport)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-15960067)
 * Hi [@rwalsh456](https://wordpress.org/support/users/rwalsh456/),
 * You can contact them through their website: [https://wp-rocket.me/support/](https://wp-rocket.me/support/)
 *  [Jazoja](https://wordpress.org/support/users/jazoja/)
 * (@jazoja)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-16083176)
 * Hi!
 * I had the same problem with WP Fastest Cache, disabling JS combine (footer) solved
   my issue.
 * Thx for the tip!

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Error on PDF’ is closed to new replies.

 * ![](https://ps.w.org/pdf-embedder/assets/icon.svg?rev=3227003)
 * [PDF Embedder](https://wordpress.org/plugins/pdf-embedder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pdf-embedder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pdf-embedder/)
 * [Active Topics](https://wordpress.org/support/plugin/pdf-embedder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pdf-embedder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pdf-embedder/reviews/)

## Tags

 * [caching](https://wordpress.org/support/topic-tag/caching/)

 * 14 replies
 * 4 participants
 * Last reply from: [Jazoja](https://wordpress.org/support/users/jazoja/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/error-on-pdf/#post-16083176)
 * Status: resolved