m-emelchenkov / pdfthumb

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

Home Page:https://www.Emelchenkov.pro/Projects/PDFThumb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

https://www.Emelchenkov.pro/Projects/PDFThumb

License:Other


Languages

Language:PHP 93.1%Language:HTML 6.9%