Support » Plugin: Media Library Assistant » [Feature Request] PDF Thumbnail

  • Really loving the plugin great work. Is it possible to add a feature?
    Trying to make the thumbnails generated by the wordpress media library a bit more palatable for working with A LOT of PDFs.

    Google has a great converter via their googledocs viewer. I was wondering if you could add a bulk thumbnail generator that would add image previews of the pdf document I upload. I could do the (convert on the fly) process but I don’t want to constantly rely on the googledocs service and slow down the user experience so a cached thumbnail would be lovely.

    I managed to just copy one test file but my php skills are poor tbh and would not be at a level to add this into an automated process without your help.

    $doc2copy = '';
    $file = '$doc2copy&a=bi&pagenumber=1&w=250';
    $newfile = 'img/full1_1_3.png';
    if (!copy($file, $newfile)) {
        echo "failed to copy $file...\n";

    If this feature could be added that would be awesome 🙂
    If not your plugin has already solved so many problems for me.
    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author David Lingren


    Thanks for the kind words and for your suggestion. I’m glad the plugin is useful for you.

    I haven’t had any experience with the converter or PDF thumbnails, but I’ll have a look and see if there’s something I can do. I am traveling until 2/12/2013 and do not have access to my development system, so it will be a while until I can investigate. I will post an update to this topic as soon as I have news.

    I read your post. To be honest, I thought you might not reply until you got back. Safe travels.

    Plugin Author David Lingren


    I am back from my travels and looking into this topic. I think it’s feasible to enhance the [mla_gallery] shortcode to generate thumbnails from Google Drive viewer on-the-fly. I’ll have to give more thought to caching thumbnail images, since storing multiple representations of non-image files is not supported by WordPress.

    In the interim, I have an additional question for you. Your example URL includes some parameters I can’t find documentation for; “a=”, “pagenumber=” and “w=”. Can you tell me where to find the most complete documentation of viewer parameters? Thanks!

    This is where I got the original code from. I have done a search and cannot find how or where he got the information to do the width or linking parameters which is a little annoying. I will post if I find something.

    Thanks for getting back to me.

    Plugin Author David Lingren


    I am working on this, but I wanted to share the following with you. I was able to get a good result by creating a custom markup template with the following in the “item” segment:

    <[+itemtag+] class='gallery-item'><br />
    	<[+icontag+] class='gallery-icon'><br />
    		<a href='[+filelink_url+]' title='[+title+]'><img src='[+filelink_url+]&a=bi&pagenumber=1&w=200'></a><br />
    	</[+icontag+]><br />
    	<[+captiontag+] class='wp-caption-text gallery-caption'><br />
    		[+caption+]<br />
    	</[+captiontag+]><br />
    </[+itemtag+]><br />

    I’ll work on a way to do this without a custom template, but it was fun to see the template in action…

    Plugin Author David Lingren


    I have just released version 1.13, which includes Google File Viewer support. Please let me know if you have any issues with the new feature, questions or further suggestions.

    This version doesn’t support caching of thumbnail images; the performance seems good and the service should be reliable.

    Thanks again for your interest, your patience and for using the plugin.

    Excellent I will test this out tomorrow. Thank you for putting your time and effort into this great plugin

    Just testing the MLA Gallery out. it works excellently 😀
    Many thanks for adding this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Feature Request] PDF Thumbnail’ is closed to new replies.