WordPress.org

Ready to get started?Download WordPress

Forums

Google Doc Embedder
Can not view pdf (don't know other files) over 20 MB (5 posts)

  1. ReaDentistry
    Member
    Posted 2 years ago #

    Wonderful Work, k3davis, Thanks
    It does what it says. I like the feature of 'Enhanced Viewer' with which I can hide all the functional buttons away, as I don't want viewers to download the files.
    The only problems I have is that it can not display a pdf file (I haven't tested other files) over 20MB. It will show a error message 'Sorry, we are unable to retrieve the document for viewing or you don't have permission to view the document'.

    It will be perfect for me if the file size limit can be lift.

    Thanks again, K3davis, well done!

    http://wordpress.org/extend/plugins/google-document-embedder/

  2. k3davis
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the kind comments. I'm glad the plugin is useful to you.

    Google has a size limitation, but in the case of the Enhanced Viewer (if you find a file that works in the Standard and not in the Enhanced, that is), you may be able to lift the allowed memory of PHP to extend the limit. There are several methods of doing this, so you may have to experiment to see which one works in your server configuration. Some involve adding a line to your .htaccess file, or to your php.ini (or php5.ini) file. Other web hosts restrict this ability entirely. You may want to refer to your web host for relevant instruction.

    Note that, since the Enhanced Viewer is called as a "proxy" outside of WordPress itself, raising the PHP memory limit in WordPress config using WP_MEMORY_LIMIT won't be effective here.

    Hope this helps.

    Kevin

  3. ReaDentistry
    Member
    Posted 2 years ago #

    Hi Kavin, Thanks for following up.

    I tried verything.
    I don't think the size limit is from my web host, as I have gained control of my hosting by stopping the System Processes. I changed php5.ini and the PHP memory limit is now 128mb which is confirmed by phpinfo

    I tried also to use short code 'embed src=', to embed a large pdf file. It could display a file of over 100mb without any problems. But I will not use it, as I cannot hide the 'save' button like I can do with your GDE plug-in.
    Is it possible that the size limitation is set somehow by the Google Docs script? I really want know the answer, but don't have that in-depth knowledge.
    GDE would be perfect for me if the size limit can be lift anyhow.

    But, still like it, Thanks.

    Edward

  4. ReaDentistry
    Member
    Posted 2 years ago #

    Really sorry Kevin, for spelling your name incorrectly.

  5. k3davis
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Edward,

    I can give you a little more information, but I'm not sure how helpful it will be. Google's viewer does have a size limitation of its own. I am not sure precisely what this is (I've never found it published, only approximately by trial and error), but certainly if the file is too large to be displayed in the Standard Viewer, the Enhanced Viewer will not do anything to improve upon that.

    If it does load in Standard but not in Enhanced, that should indeed fall under the purview of the settings you tried to change. The Enhanced Viewer basically buffers a copy of the Standard Viewer locally and makes some modifications to it before outputting it to the browser. I would not think that how the file itself loads would be affected by this, so I would expect the same behavior from both as far as file size limitation, but perhaps there's another variable there I'm not considering.

    Using <embed> would do away with this, as it's not actually loading the document and doing any conversion to images (which is what the viewer does), but simply inserting a frame with the file as it is. But as you mentioned all the benefits of using either viewer are lost in this case.

    Probably least helpful of all, but permit me to ask: why are your PDF files so large? If it's possible for you to optimize them for web/screen use, even if you must link to a full res version for some other reason such as "download hi-res" or "print-ready version", that would seem to make sense. I'm not suggesting you do things my way in order to "fix" the plugin, but if you haven't critically considered optimizing your PDF for web use prior to loading it into the plugin, I think you'll find a lot better results that way.

    I hope that helps at least somewhat.

    Kevin

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic