Title: Error loading pdf
Last modified: May 18, 2020

---

# Error loading pdf

 *  [petterbergstrom](https://wordpress.org/support/users/petterbergstrom/)
 * (@petterbergstrom)
 * [6 years ago](https://wordpress.org/support/topic/error-loading-pdf/)
 * I get error loading pdf, using shortcode [pdfjs-viewer url=https://tidning.alternativ.
   nu/wp-content/uploads/Halmbacken.pdf].
 * ” PDF.js v2.3.200 (build: 4ae3f9fc)
    Meddelande: file origin does not match viewer’s”
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-loading-pdf%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Thomas McMahon](https://wordpress.org/support/users/twistermc/)
 * (@twistermc)
 * [6 years ago](https://wordpress.org/support/topic/error-loading-pdf/#post-12852386)
 * You cannot load the viewer and the PDF from different domains for security reasons.
 * Your code looks to be loading the viewer from [https://secureservercdn.net](https://secureservercdn.net)
   so your PDF URL would have to match. Or better yet, load them both from [https://tidning.alternativ.nu](https://tidning.alternativ.nu)
 *  Thread Starter [petterbergstrom](https://wordpress.org/support/users/petterbergstrom/)
 * (@petterbergstrom)
 * [6 years ago](https://wordpress.org/support/topic/error-loading-pdf/#post-12853828)
 * Hm, I have no idea what [https://secureservercdn.net](https://secureservercdn.net)
   is, maybe some securityplugin or something the host Godaddy is using?
 * I just uploaded the plugin in the wp admin from my computer as usual… How to 
   do it else?
    -  This reply was modified 6 years ago by [petterbergstrom](https://wordpress.org/support/users/petterbergstrom/).
 *  [jrstaatsiii](https://wordpress.org/support/users/jrstaatsiii/)
 * (@jrstaatsiii)
 * [6 years ago](https://wordpress.org/support/topic/error-loading-pdf/#post-12866205)
 * So you cannot load pdf’s from a CDN? Is this universally true, or just true with
   this particular plugin. Thanks! – Rich
 * UPDATE: I don’t know if this will work for everyone, but referencing the relative
   path of the file seemed to work for me. When I view the source, it still appears
   to be loading from the cdn, however it works…not sure how solid of a solution
   this is, but good enough for me at the moment.
    -  This reply was modified 6 years ago by [jrstaatsiii](https://wordpress.org/support/users/jrstaatsiii/).
 *  Plugin Author [Thomas McMahon](https://wordpress.org/support/users/twistermc/)
 * (@twistermc)
 * [6 years ago](https://wordpress.org/support/topic/error-loading-pdf/#post-12867606)
 * It can’t load from a CDN due to security concerns.
    [https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-xhr](https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-xhr)
 * I’m glad you figured out something that worked for you though.
 *  [Marlimant](https://wordpress.org/support/users/marlimant/)
 * (@marlimant)
 * [6 years ago](https://wordpress.org/support/topic/error-loading-pdf/#post-12921440)
 * The same here, even with the last update 1.5.1, the pdf cannot be showed in firefox.
   
   [https://www.jorge-diaz.org/jorge-diaz-en-cineyliteratura-cl/](https://www.jorge-diaz.org/jorge-diaz-en-cineyliteratura-cl/)
    -  This reply was modified 6 years ago by [Marlimant](https://wordpress.org/support/users/marlimant/).

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

The topic ‘Error loading pdf’ is closed to new replies.

 * ![](https://ps.w.org/pdfjs-viewer-shortcode/assets/icon-256x256.png?rev=2301161)
 * [PDF.js Viewer](https://wordpress.org/plugins/pdfjs-viewer-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/pdfjs-viewer-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/pdfjs-viewer-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pdfjs-viewer-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pdfjs-viewer-shortcode/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Marlimant](https://wordpress.org/support/users/marlimant/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/error-loading-pdf/#post-12921440)
 * Status: not resolved