Skip to content
A Craft CMS plugin for generating preview images of PDF files.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
services
templates
twigextensions
.gitignore
License.txt
PdfthumbPlugin.php
Readme.md
Readme.png

Readme.md

PDFThumb plugin for Craft CMS

Generate previews of PDF files.

Pre-requirements

PHP ImageMagick library must be installed.

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 not included

Technical support

  • Commercial support, adaptation and custom development.
    Get help directly from project author.
  • Community support.
    You can submit questions, bug reports and feature requests to issue tracker. It's free, just no SLA guaranteed. Pull requests are welcome!

Looking for a project maintainer.

License

Copyright © 2015, 2016 Mikhail Emelchenkov. Source code is distributed under CDDL 1.0 open source license.

You can’t perform that action at this time.