Autogenerated PDF Thumbnail using PDFThumb in a Matrix Field I would like to autogenerate a thumbnail of PDF's, and from this question I found the plugin PDFThumb. The problem I'm running into is I'm relatively new to Craft, and I can't seem to figure out how to use the provided code when it is with a Matrix field.
As I said I'm new to this, and I usually end up tying myself in knots when trying to backtrack the variable references, and I think that's the problem here.
The reference code from the plugin repo:
{% for myAsset in item.assetRef %}
    &lt;img src=&quot;{{ craft.PDFThumb.thumbnail(myAsset) }}&quot;&gt;
    &lt;img src=&quot;{{ craft.PDFThumb.thumbnail(myAsset, 100, 100) }}&quot;&gt;
    &lt;img src=&quot;{{ craft.PDFThumb.thumbnail(myAsset, 100, 150, true, 'jpg') }}&quot;&gt;
{% endfor %}

And my code:
{% set pdfBlocks = entry.infoPagePDF.all() %}
{% if pdfBlocks|length %}
        {% for block in pdfBlocks %}
            {% if block.type == &quot;pdf&quot; %}
                {% if block.pdfFile %}
                    {% set rel = block.pdfFile.one() %}
                    {% if rel %}
                        &lt;a href=&quot;{{ rel.url }}&quot;&gt;{{ rel.title }}&lt;/a&gt;
                    {# Autogenerated Thumb #}
                        {% for myAsset in item.assetRef %}
                            &lt;img src=&quot;{{ craft.PDFThumb.thumbnail(myAsset) }}&quot;&gt;
                        {% endfor %}
                    {% endif %}
                {% endif %}
            {% endif %} 
       {% endfor %}
{% endif %}
                

The link generates fine, it's the image that doesn't.
I've tried a bunch of different variations, but the problem (I think) revolves around the fact I'm not sure what I'm supposed to be referencing in the FOR(myAsset and item.assetRef), so for clarity I reset my attempts to the provided code example.
You mixed in some code from the documentation resulting in a wrong variable name..
{% set pdfBlocks = entry.inhaltMatrix.all() %}
    {% if pdfBlocks|length %}
        {% for block in pdfBlocks %}
            {% if block.type == &quot;pdf&quot; %}
                {% if block.pdfFile %}
                    {% set rel = block.pdfFile.one() %}
                    {% if rel %}
                        &lt;a href=&quot;{{ rel.url }}&quot;&gt;{{ rel.title }}&lt;/a&gt;
                        &lt;img src=&quot;{{ craft.PDFThumb.thumbnail(rel) }}&quot;&gt;
               
                    {% endif %}
                {% endif %}
            {% endif %} 
       {% endfor %}
{% endif %}

Also be sure to go to the plugins settings and set the appropriate assets paths.