Title: Shortcode Document (su-document) &#8211; Empty iframe
Last modified: October 3, 2019

---

# Shortcode Document (su-document) – Empty iframe

 *  Resolved [tschortschomagic](https://wordpress.org/support/users/tschortschomagic/)
 * (@tschortschomagic)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/shortcode-document-su-document-empty-iframe/)
 * Hi,
 * I’m using the shortcode [su-document] to embed PDF files on several pages which
   basically works like a charm. Having said this, I noticed that the embedded PDF
   files frequently are not loaded properly resulting in a blank iframe. This happens
   browser independent on Safari, Chrome, Firefox, Opera or Edge. As of yet I was
   not able to find the reason behind this behaviour.
 * Plugin, WordPress and Browser are all up to date. I certainly tested with the
   standard theme (Twenty Nineteen) as well, but same result!
 * I appreciate any help as I really rely on this awesome shortcode!
 * Kind regards,
    George

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

 *  Plugin Author [Vova](https://wordpress.org/support/users/gn_themes/)
 * (@gn_themes)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/shortcode-document-su-document-empty-iframe/#post-11994884)
 * Hi George,
 * the [su_document] shortcode only displays an iframe with the Google Document 
   Viewer, it doesn’t render documents. I’m afraid I can’t help here.
 * Make sure you’re using an httpS URL.
 *  Thread Starter [tschortschomagic](https://wordpress.org/support/users/tschortschomagic/)
 * (@tschortschomagic)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/shortcode-document-su-document-empty-iframe/#post-12032639)
 * Hi Vladimir,
 * thanks for your answer! I am using https URLs and I’m aware that [su_document]
   only displays an iframe with Google Document Viewer embedded! As the issue explained
   above even occurs on a clean installed WordPress instance without any other plugins
   and certainly using the standard theme I think it has to do something with the
   shortcode or at least with the plugin itself.. It basically works but, let’s 
   say every third time loading the site, it doesn’t.
 * What do you think? Could it be somehow security related in the current browser
   versions that contents of iframe are occasionally blocked?
 * Kind regards,
    George
 *  Plugin Author [Vova](https://wordpress.org/support/users/gn_themes/)
 * (@gn_themes)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/shortcode-document-su-document-empty-iframe/#post-12038178)
 * Hi George,
 * this is definitely related to browser security policies and the Google APIs.
 * I’ve added the following content to a page and tried loading it multiple times
   in Safari and Chrome:
 *     ```
       [su_document url="https://www.gnu.org/licenses/gpl-3.0.rtf"]
   
       <iframe src="//docs.google.com/viewer?embedded=true&url=https://www.gnu.org/licenses/gpl-3.0.rtf" width="600" height="400" class="su-document" title=""></iframe>
       ```
   
 * The second part with iframe is the exact copy of what outputs the shortcode from
   the first part.
 * After a few reloads a got the following results:
 * Safari
 * ![](https://i0.wp.com/i.imgur.com/t53XFzV.png?ssl=1)
 * Chrome
 * ![](https://i0.wp.com/i.imgur.com/aVynAqs.png?ssl=1)
 * Sometimes both elements are empty, sometimes only one of them.
 * According to Safari’s error log, the issue is related to some script inside the
   iframe. That means the issue is on the Google side.

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

The topic ‘Shortcode Document (su-document) – Empty iframe’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [WP Shortcodes Plugin — Shortcodes Ultimate](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Vova](https://wordpress.org/support/users/gn_themes/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/shortcode-document-su-document-empty-iframe/#post-12038178)
 * Status: resolved