preview thumbnail with pdf file

4 posts by 3 authors in: Forums > CMS Builder
Last Post: February 22, 2011   (RSS)

By Maurice - January 11, 2011

Hi team,

When i upload a zip or pdf file i want to add a thumbnail of that file how would that be the best way to do that?

Greetz Maurice
-------------------------------------------

Dropmonkey.nl

Re: [Maurice] preview thumbnail with pdf file

By Jason - January 11, 2011

Hi Maurice,

Currently, it's only possible to CMS Builder to create a thumbnail of an image file.

If you have a graphic that you would like to display for a zip or a pdf file, you can check the uploads extension field and then output that a corresponding image.

For example:

<?php foreach ($record['upload'] as $upload):?>
<?php if($upload['extension']=="zip"):?>
*OUTPUT ZIP GRAPHIC*
<?php elseif ($upload['extension']=="pdf"):?>
*OUTPUT PDF GRAPHIC*
<?php endif ?>
<?php endforeach ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] preview thumbnail with pdf file

By MercerDesign - February 22, 2011

I have just implemented this but I need to limit the pdf graphic to just one, so for example if 3 pdfs are uploaded I just want to display one graphic. The url is:http://www.wildcountryconsultants.co.uk/cms/wildcountry_consultants_uk_courses.php