Generate PDF preview images automatically? Is it possible to auto generate PDF preview images with Craft transforms? This popular Q/A at Stack Overflow shows a PHP solution making use of ImageMagick and GhostScript. Is installing these plugins all I'd need to make Craft do the transforms with pdf.getUrl('thumb')?

Currently I use an assets - asset meta field on the PDF to achieve what I want (see code below), but that means I have to generate and upload the image myself. So I wondered if there's a nice and easy way to automate that process.

{% for pdf in entry.pdfAssets %}

    {# Get the pdf preview thumb or use a generic one as a fallback #}
    {% set previewImage = pdf.previewImage|length ? pdf.previewImage.first.url('thumb') : 'pdf_thumb.jpg' %}

    &lt;a href="{{ pdf.url }}" target="_blank"&gt;
        &lt;img src="{{ previewImage }}"&gt;
    &lt;/a&gt;

{% endfor %}
There a plugin for that:

https://github.com/carnesmedia/pthumb

PThumb is a Craft plugin that generates thumbnail preview images for PDF documents. It's easy to drop into your templates, requires only the commmand-line version of ImageMagick (not the PHP bindings), and caches the generated thumbnails.

&lt;img src="{{ craft.PThumb.thumbnail(myAsset) }}"&gt;
&lt;img src="{{ craft.PThumb.thumbnail(myAsset, 100, 100) }}"&gt;
&lt;img src="{{ craft.PThumb.thumbnail(myAsset, 100, 150, true, 'jpg') }}"&gt;