Title: PDF Loading Error
Last modified: May 25, 2021

---

# PDF Loading Error

 *  Resolved [heatherc747](https://wordpress.org/support/users/heatherc747/)
 * (@heatherc747)
 * [5 years ago](https://wordpress.org/support/topic/pdf-loading-error/)
 * I installed the plugin, added my shortcode with a variable to my ACF File field,
   and for some reason the pdf won’t load. The iframe generates, so I know something
   is working. On the page right above the iframe I am echoing the variable so I
   know the file is fine. Not sure what is up.
 *     ```
       <?php $file = get_field('pdf'); ?>
                   <?php $fileURL = $file['url']; ?>
                   <?php echo $fileURL; ?>
                   <?php echo do_shortcode("[pdfjs-viewer url=.' $fileURL '. viewer_width=100% viewer_height=640px fullscreen=no download=true print=true]"); ?>
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpdf-loading-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Thomas McMahon](https://wordpress.org/support/users/twistermc/)
 * (@twistermc)
 * [5 years ago](https://wordpress.org/support/topic/pdf-loading-error/#post-14505062)
 * It’s loading for me in Safari.
 *  Thread Starter [heatherc747](https://wordpress.org/support/users/heatherc747/)
 * (@heatherc747)
 * [5 years ago](https://wordpress.org/support/topic/pdf-loading-error/#post-14505066)
 * Thanks – I wasn’t rendering the PDF url correctly, my bad.
 *  [Coop920](https://wordpress.org/support/users/coop920/)
 * (@coop920)
 * [5 years ago](https://wordpress.org/support/topic/pdf-loading-error/#post-14512541)
 * [@heatherc747](https://wordpress.org/support/users/heatherc747/) what did you
   change?
    -  This reply was modified 5 years ago by [Coop920](https://wordpress.org/support/users/coop920/).
 *  Thread Starter [heatherc747](https://wordpress.org/support/users/heatherc747/)
 * (@heatherc747)
 * [5 years ago](https://wordpress.org/support/topic/pdf-loading-error/#post-14516664)
 * [@coop920](https://wordpress.org/support/users/coop920/) I don’t even remember,
   it was a silly syntax thing.

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

The topic ‘PDF Loading Error’ 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/)

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