PDFThumb

A Craft CMS plugin for generating preview images of PDF files.

How to use

Twig example*:

<div class="pdf">
    {% set params = { width: 640 } %}
    <img src="{{ pdfthumb.get(block.file.first().url, params) }}">
    <div class="centered"><div>
        <a href="{{ block.file.first().url }}"><i class="fa fa-expand"></i> PDF</a>
    </div></div>
</div>

where block.file.first().url is a URL of PDF file, and params can have width or height properties or both.

Screenshot

* CSS styles are not attached

Loading comments…

Download

Development

License

CDDL 1.0 open-source license

System requirements

  • Craft CMS 2.x
  • PHP ImageMagick library

Technologies

Craft CMS PHP

Year of Production

2015